Fixed enum drop downs not working when the JSONEditor is configured with a name (see #285)
This commit is contained in:
parent
b18537f976
commit
b67d683f1a
|
@ -3,6 +3,12 @@
|
|||
https://github.com/josdejong/jsoneditor
|
||||
|
||||
|
||||
## not yet released, version 5.5.5
|
||||
|
||||
- Fixed enum drop downs not working when the JSONEditor is configured with
|
||||
a name.
|
||||
|
||||
|
||||
## 2016-05-22, version 5.5.4
|
||||
|
||||
- Fixed #285: an issue with the enum drop down when having defined multiple
|
||||
|
|
|
@ -80,9 +80,11 @@ Node.prototype.getPath = function () {
|
|||
var node = this;
|
||||
var path = [];
|
||||
while (node) {
|
||||
var field = (!node.parent || node.parent.type != 'array')
|
||||
? node.field
|
||||
: node.index;
|
||||
var field = !node.parent
|
||||
? undefined // do not add an (optional) field name of the root node
|
||||
: (node.parent.type != 'array')
|
||||
? node.field
|
||||
: node.index;
|
||||
|
||||
if (field !== undefined) {
|
||||
path.unshift(field);
|
||||
|
|
Loading…
Reference in New Issue