editor: missing deepCopy usage
This commit is contained in:
parent
f6ba50417c
commit
0f9e694cb1
1 changed files with 2 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
var widgetCategories = require('../widgets/').categories,
|
||||
{updateWidget} = require('./data-workers'),
|
||||
widgetManager = require('../managers/widgets'),
|
||||
{deepCopy} = require('../../utils'),
|
||||
{icon} = require('../ui/utils')
|
||||
|
||||
module.exports = function editField(editor, widget, propName, defaultValue){
|
||||
|
|
@ -91,7 +92,7 @@ module.exports = function editField(editor, widget, propName, defaultValue){
|
|||
|
||||
var newWidgets = []
|
||||
for (var w of editor.selectedWidgets) {
|
||||
w.props[propName] = v !== '' ? v : JSON.parse(JSON.stringify(defaultValue))
|
||||
w.props[propName] = v !== '' ? v : deepCopy(defaultValue)
|
||||
newWidgets.push(updateWidget(w, {preventSelect: editor.selectedWidgets.length > 1}))
|
||||
}
|
||||
editor.pushHistory()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue