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