Fix: Edit history modal crash (#10834)
* failing test * handle nodes without children in messagediffutils
This commit is contained in:
parent
eac548c25a
commit
41c96877d3
3 changed files with 36 additions and 2 deletions
|
@ -104,8 +104,10 @@ function diffTreeToDOM(desc: Text | HTMLElement): Node {
|
|||
for (const [key, value] of Object.entries(desc.attributes)) {
|
||||
node.setAttribute(key, value.value);
|
||||
}
|
||||
for (const childDesc of desc.childNodes) {
|
||||
node.appendChild(diffTreeToDOM(childDesc as Text | HTMLElement));
|
||||
if (desc.childNodes) {
|
||||
for (const childDesc of desc.childNodes) {
|
||||
node.appendChild(diffTreeToDOM(childDesc as Text | HTMLElement));
|
||||
}
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue