don't call removeChild if no parent
This commit is contained in:
parent
1da116bbd3
commit
1bd3b713d2
1 changed files with 1 additions and 1 deletions
|
|
@ -178,7 +178,7 @@ Mithril = m = new function app(window) {
|
||||||
return cachedAttrs
|
return cachedAttrs
|
||||||
}
|
}
|
||||||
function clear(nodes) {
|
function clear(nodes) {
|
||||||
for (var i = nodes.length - 1; i > -1; i--) if (nodes[i]) nodes[i].parentNode.removeChild(nodes[i])
|
for (var i = nodes.length - 1; i > -1; i--) if (nodes[i] && nodes[i].parentNode) nodes[i].parentNode.removeChild(nodes[i])
|
||||||
nodes.length = 0
|
nodes.length = 0
|
||||||
}
|
}
|
||||||
function injectHTML(parentElement, index, data) {
|
function injectHTML(parentElement, index, data) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue