mirror of https://github.com/vector-im/riot-web
Merge pull request #3680 from matrix-org/travis/fix-list-diff
Don't assume that diffs will have an appropriate child nodepull/21833/head
commit
01ba4aca45
|
@ -77,6 +77,8 @@ function findRefNodes(root, route, isAddition) {
|
||||||
const end = isAddition ? route.length - 1 : route.length;
|
const end = isAddition ? route.length - 1 : route.length;
|
||||||
for (let i = 0; i < end; ++i) {
|
for (let i = 0; i < end; ++i) {
|
||||||
refParentNode = refNode;
|
refParentNode = refNode;
|
||||||
|
// Lists don't have appropriate child nodes we can use.
|
||||||
|
if (!refNode.childNodes[route[i]]) continue;
|
||||||
refNode = refNode.childNodes[route[i]];
|
refNode = refNode.childNodes[route[i]];
|
||||||
}
|
}
|
||||||
return {refNode, refParentNode};
|
return {refNode, refParentNode};
|
||||||
|
|
Loading…
Reference in New Issue