Fixed #769: option `name` not working anymore

This commit is contained in:
jos 2019-08-15 10:04:57 +02:00
parent ca6e384e8d
commit 174918f4eb
2 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ https://github.com/josdejong/jsoneditor
`preview` when `statusBar: false`.
- When duplicating an object property, move focus to the field and do not
immediately add the ` (copy)` suffix. See #766.
- Fixed #769: option `name` not working anymore. Regression since `v6.1.0`.
## 2019-08-01, version 6.2.1

View File

@ -375,7 +375,7 @@ treemode._setRoot = function (node) {
this.node = node;
node.setParent(null);
node.setField(undefined, false);
node.setField(this.getName(), false);
delete node.index;
// append to the dom