Merge pull request #425 from sebastiancarlsson/cleanup-called-twice-bug

fixes bug where cleanUp would be called twice
This commit is contained in:
Sam Potts 2016-11-18 09:40:34 +11:00 committed by GitHub
commit 5214c5d55d

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;