fixes bug where cleanUp would be called twice

This commit is contained in:
Sebastian Carlsson 2016-11-17 15:43:26 +01:00
parent 7d2a8d343a
commit 3e6ed7b69b

View File

@ -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;