mirror of
https://github.com/videojs/video.js.git
synced 2025-01-04 06:48:49 +02:00
test(hooks): fix hooks unit test in ie8 (#3745)
This commit is contained in:
parent
8d51235b30
commit
e9e5b5f782
@ -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
|
||||
|
@ -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};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user