editor: avoid mutating widget's children list twice

This commit is contained in:
jean-emmanuel 2018-10-17 14:53:57 +02:00
parent 4811b2c15b
commit ee559241a9

View file

@ -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) {