Don't assume that diffs will have an appropriate child node
Fixes https://github.com/vector-im/riot-web/issues/11497 This is a regression from react-sdk v1.5.0 where the diff feature was added in the first place. It only affects lists.
This commit is contained in:
parent
fbba55ab05
commit
673e6c3162
1 changed files with 2 additions and 0 deletions
|
@ -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 a new issue