From 13e8aeae4ede65e8839e8f22a47ab5e808b299ca Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sun, 3 Jul 2022 20:22:19 +0100 Subject: [PATCH] Fix defaulting to monaco if settings does not contain codeEditor --- .../node_modules/@node-red/editor-api/lib/editor/theme.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/editor-api/lib/editor/theme.js b/packages/node_modules/@node-red/editor-api/lib/editor/theme.js index 5a8dacde4..88b3eeb62 100644 --- a/packages/node_modules/@node-red/editor-api/lib/editor/theme.js +++ b/packages/node_modules/@node-red/editor-api/lib/editor/theme.js @@ -101,7 +101,10 @@ module.exports = { } themeSettings = null; theme = settings.editorTheme || {}; - themeContext.asset.vendorMonaco = ((theme.codeEditor || {}).lib === "monaco") ? "vendor/monaco/monaco-bootstrap.js" : ""; + themeContext.asset.vendorMonaco = "vendor/monaco/monaco-bootstrap.js" + if (theme.codeEditor && theme.codeEditor.lib === 'ace') { + themeContext.asset.vendorMonaco = '' + } activeTheme = theme.theme; },