Fix redo duplicate not checking for duplicate property names
This commit is contained in:
parent
d31917390c
commit
6ccf5c651d
|
@ -1,5 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
var util = require('./util');
|
||||
|
||||
/**
|
||||
* @constructor History
|
||||
* Store action history, enables undo and redo
|
||||
|
@ -121,6 +123,8 @@ function History (editor) {
|
|||
var nodes = params.paths.map(findNode);
|
||||
nodes.forEach(function (node) {
|
||||
var clone = node.clone();
|
||||
var existingFieldNames = parentNode.getFieldNames();
|
||||
clone.field = util.findUniqueName(node.field, existingFieldNames);
|
||||
parentNode.insertAfter(clone, afterNode);
|
||||
afterNode = clone;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue