diff --git a/src/editor.js b/src/editor.js index 7993f783e..ca3033af7 100644 --- a/src/editor.js +++ b/src/editor.js @@ -39,9 +39,9 @@ JSONEditor.AbstractEditor = Class.extend({ this.original_schema = options.schema; this.schema = this.jsoneditor.expandSchema(this.original_schema); - - this.options = $extend({}, (this.options || {}), (options.schema.options || {}), options); - + + this.options = $extend({}, (this.options || {}), (this.schema.options || {}), (options.schema.options || {}), options); + if(!options.path && !this.schema.id) this.schema.id = 'root'; this.path = options.path || 'root'; this.formname = options.formname || this.path.replace(/\.([^.]+)/g,'[$1]');