Fix restored media element from placeholder not loading previously blocked content.

This commit is contained in:
hackademix 2018-12-06 22:51:53 +01:00
parent 07b9084829
commit 8f0bdc1493
1 changed files with 3 additions and 3 deletions

View File

@ -144,7 +144,7 @@ var PlaceHolder = (() => {
replacement._placeHolderElement = element;
element.parentNode.replaceChild(replacement, element);
element.replaceWith(replacement);
this.replacements.add(replacement);
}
@ -162,8 +162,8 @@ var PlaceHolder = (() => {
return;
}
try {
var element = replacement._placeHolderElement;
replacement.parentNode.replaceChild(element, replacement);
let element = replacement._placeHolderElement;
replacement.replaceWith(element.cloneNode(true));
this.replacements.delete(replacement);
} catch (e) {
error(e, "While replacing");