Fixed #928: Custom root name not reflected in path of navigation bar

This commit is contained in:
jos 2020-03-12 21:44:20 +01:00
parent f6152c2103
commit 854a407da1
2 changed files with 7 additions and 2 deletions

View File

@ -3,9 +3,14 @@
https://github.com/josdejong/jsoneditor 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 ## 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. to `'code'` mode.

View File

@ -1211,7 +1211,7 @@ treemode._updateTreePath = function (pathNodes) {
function getName (node) { function getName (node) {
return node.parent return node.parent
? ((node.parent.type === 'array') ? node.index : node.field) ? ((node.parent.type === 'array') ? node.index : node.field)
: node.type : (node.field || node.type)
} }
} }