Skip to content

Commit

Permalink
test(hooks): fix hooks unit test in ie8 (#3745)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey authored and gkatsev committed Nov 4, 2016
1 parent 8d51235 commit e9e5b5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/js/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/unit/video.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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};
});
Expand Down

0 comments on commit e9e5b5f

Please sign in to comment.