mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Use parentNode, parentElement is not supported on IE11
This commit is contained in:
parent
a7acb0278d
commit
a0c8d147c3
@ -47,7 +47,7 @@ export class SwitchView {
|
||||
} catch (err) {
|
||||
newRoot = errorToDOM(err);
|
||||
}
|
||||
const parent = oldRoot.parentElement;
|
||||
const parent = oldRoot.parentNode;
|
||||
if (parent) {
|
||||
parent.replaceChild(newRoot, oldRoot);
|
||||
}
|
||||
|
@ -242,8 +242,8 @@ class TemplateBuilder {
|
||||
if (prevValue !== newValue) {
|
||||
prevValue = newValue;
|
||||
const newNode = renderNode(node);
|
||||
if (node.parentElement) {
|
||||
node.parentElement.replaceChild(newNode, node);
|
||||
if (node.parentNode) {
|
||||
node.parentNode.replaceChild(newNode, node);
|
||||
}
|
||||
node = newNode;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user