Merge pull request #425 from sebastiancarlsson/cleanup-called-twice-bug
fixes bug where cleanUp would be called twice
This commit is contained in:
commit
5214c5d55d
@ -3257,7 +3257,7 @@
|
||||
plyr.embed.unload().then(cleanUp);
|
||||
|
||||
// Vimeo does not always return
|
||||
window.setTimeout(cleanUp, 200);
|
||||
timers.cleanUp = window.setTimeout(cleanUp, 200);
|
||||
|
||||
break;
|
||||
|
||||
@ -3273,6 +3273,8 @@
|
||||
}
|
||||
|
||||
function cleanUp() {
|
||||
clearTimeout(timers.cleanUp);
|
||||
|
||||
// Default to restore original element
|
||||
if (!_is.boolean(restore)) {
|
||||
restore = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user