1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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

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);