diff --git a/HISTORY.md b/HISTORY.md index 3bf142d..2a4742e 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,9 +3,14 @@ https://github.com/josdejong/jsoneditor +## not yet published, version 8.6.2 + +# Fixed #928: Custom root name not reflected in path of navigation bar. + + ## 2020-02-17, version 8.6.1 -- Fix #908: editor throwing an exception when switching from `'preview'` +- Fixed #908: editor throwing an exception when switching from `'preview'` to `'code'` mode. diff --git a/src/js/treemode.js b/src/js/treemode.js index 89e03b5..1eae6d9 100644 --- a/src/js/treemode.js +++ b/src/js/treemode.js @@ -1211,7 +1211,7 @@ treemode._updateTreePath = function (pathNodes) { function getName (node) { return node.parent ? ((node.parent.type === 'array') ? node.index : node.field) - : node.type + : (node.field || node.type) } }