From 854a407da152bd2a190eb5df0c7343d2ef28edc3 Mon Sep 17 00:00:00 2001 From: jos Date: Thu, 12 Mar 2020 21:44:20 +0100 Subject: [PATCH] Fixed #928: Custom root name not reflected in path of navigation bar --- HISTORY.md | 7 ++++++- src/js/treemode.js | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) 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) } }