Fixed JSONEditor not working without having a schema defined
This commit is contained in:
parent
6a0ac9549a
commit
de71499269
|
@ -1,4 +1,5 @@
|
|||
.idea
|
||||
.vscode
|
||||
build
|
||||
downloads
|
||||
node_modules
|
||||
|
|
|
@ -1998,7 +1998,9 @@ Node.prototype._updateSchema = function () {
|
|||
//Locating the schema of the node and checking for any enum type
|
||||
if(this.editor && this.editor.options) {
|
||||
// find the part of the json schema matching this nodes path
|
||||
this.schema = Node._findSchema(this.editor.options.schema, this.getPath());
|
||||
this.schema = this.editor.options.schema
|
||||
? Node._findSchema(this.editor.options.schema, this.getPath())
|
||||
: null;
|
||||
if (this.schema) {
|
||||
this.enum = Node._findEnum(this.schema);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue