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) {
|
} catch (err) {
|
||||||
newRoot = errorToDOM(err);
|
newRoot = errorToDOM(err);
|
||||||
}
|
}
|
||||||
const parent = oldRoot.parentElement;
|
const parent = oldRoot.parentNode;
|
||||||
if (parent) {
|
if (parent) {
|
||||||
parent.replaceChild(newRoot, oldRoot);
|
parent.replaceChild(newRoot, oldRoot);
|
||||||
}
|
}
|
||||||
|
@ -242,8 +242,8 @@ class TemplateBuilder {
|
|||||||
if (prevValue !== newValue) {
|
if (prevValue !== newValue) {
|
||||||
prevValue = newValue;
|
prevValue = newValue;
|
||||||
const newNode = renderNode(node);
|
const newNode = renderNode(node);
|
||||||
if (node.parentElement) {
|
if (node.parentNode) {
|
||||||
node.parentElement.replaceChild(newNode, node);
|
node.parentNode.replaceChild(newNode, node);
|
||||||
}
|
}
|
||||||
node = newNode;
|
node = newNode;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user