Skip to content

Commit 07239a7

Browse files
committed
Make _onSchemaChange robust against not having aceEditor loaded
1 parent f6105e4 commit 07239a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/js/textmode.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,10 @@ textmode.create = function (container, options = {}) {
406406
}
407407

408408
textmode._onSchemaChange = function (schema, schemaRefs) {
409+
if (!this.aceEditor) {
410+
return
411+
}
412+
409413
if (this.options.allowSchemaSuggestions && schema) {
410414
this.aceEditor.setOption('enableBasicAutocompletion', [new SchemaTextCompleter(schema, schemaRefs)])
411415
this.aceEditor.setOption('enableLiveAutocompletion', true)

0 commit comments

Comments
 (0)