Merge pull request #3791 from Steve-Mcl/allow-editor-create-no-title-no-mode

Allow `mode` and `title` to be omitted in `options` argument for `createEditor`
This commit is contained in:
Nick O'Leary 2022-07-21 11:39:02 +01:00 committed by GitHub
commit bfdbeb0964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -764,7 +764,7 @@ RED.editor.codeEditor.monaco = (function() {
if(!options.stateId && options.stateId !== false) {
options.stateId = RED.editor.generateViewStateId("monaco", options, (options.mode || options.title).split("/").pop());
options.stateId = RED.editor.generateViewStateId("monaco", options, (options.mode || options.title || "").split("/").pop());
}
var el = options.element || $("#"+options.id)[0];
var toolbarRow = $("<div>").appendTo(el);