editor: avoid mutating widget's children list twice
This commit is contained in:
parent
fb10a5ce17
commit
a6d449804e
1 changed files with 1 additions and 1 deletions
|
|
@ -40,7 +40,7 @@ function updateWidget(widget, options={}) {
|
|||
removedChildren = []
|
||||
|
||||
if (reuseChildren) {
|
||||
children = widget.children
|
||||
children = [...widget.children]
|
||||
if (options.removedIndexes) {
|
||||
options.removedIndexes = options.removedIndexes.sort((a, b) => b - a)
|
||||
for (let i of options.removedIndexes) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue