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
|
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
|
## 2016-05-22, version 5.5.4
|
||||||
|
|
||||||
- Fixed #285: an issue with the enum drop down when having defined multiple
|
- 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 node = this;
|
||||||
var path = [];
|
var path = [];
|
||||||
while (node) {
|
while (node) {
|
||||||
var field = (!node.parent || node.parent.type != 'array')
|
var field = !node.parent
|
||||||
? node.field
|
? undefined // do not add an (optional) field name of the root node
|
||||||
: node.index;
|
: (node.parent.type != 'array')
|
||||||
|
? node.field
|
||||||
|
: node.index;
|
||||||
|
|
||||||
if (field !== undefined) {
|
if (field !== undefined) {
|
||||||
path.unshift(field);
|
path.unshift(field);
|
||||||
|
|
Loading…
Reference in New Issue