diff --git a/HISTORY.md b/HISTORY.md index 121daf4..4a9bdf9 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -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 diff --git a/src/js/treemode.js b/src/js/treemode.js index ad5af68..b721c39 100644 --- a/src/js/treemode.js +++ b/src/js/treemode.js @@ -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