From e9e5b5f78240643726f280d69c5df0e46192359d Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Fri, 4 Nov 2016 16:43:27 -0400 Subject: [PATCH] test(hooks): fix hooks unit test in ie8 (#3745) --- src/js/video.js | 4 ++-- test/unit/video.test.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/video.js b/src/js/video.js index 3a4e62c96f..9047281f11 100644 --- a/src/js/video.js +++ b/src/js/video.js @@ -107,14 +107,14 @@ function videojs(id, options, ready) { } videojs.hooks('beforesetup').forEach(function(hookFunction) { - const opts = hookFunction(tag, videojs.mergeOptions({}, options)); + const opts = hookFunction(tag, mergeOptions(options)); if (!opts || typeof opts !== 'object' || Array.isArray(opts)) { videojs.log.error('please return an object in beforesetup hooks'); return; } - options = videojs.mergeOptions(options, opts); + options = mergeOptions(options, opts); }); // If not, set up a new player diff --git a/test/unit/video.test.js b/test/unit/video.test.js index bc2402a688..ac7843b194 100644 --- a/test/unit/video.test.js +++ b/test/unit/video.test.js @@ -336,7 +336,7 @@ QUnit.test('beforesetup options override videojs options', function(assert) { const vid = document.getElementById('test_vid_id'); - videojs.hook('beforesetup', function(options) { + videojs.hook('beforesetup', function(tag, options) { assert.equal(options.autoplay, false, 'false was passed to us'); return {autoplay: true}; });