From bc7852c1cc0889ec9f4686d0efca00592a99a0d0 Mon Sep 17 00:00:00 2001 From: Steve-Mcl Date: Thu, 21 Jul 2022 14:44:29 +0100 Subject: [PATCH] Allow codeEditor theme to be set missing from settings.js --- .../node_modules/@node-red/editor-api/lib/editor/theme.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 7be8868d3..c21a7e6e7 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 @@ -327,9 +327,8 @@ module.exports = { themeContext.header.url = themePlugin.header.url || themeContext.header.url } } - if(theme.codeEditor) { - theme.codeEditor.options = Object.assign({}, themePlugin.monacoOptions, theme.codeEditor.options); - } + theme.codeEditor = theme.codeEditor || {} + theme.codeEditor.options = Object.assign({}, themePlugin.monacoOptions, theme.codeEditor.options); } activeThemeInitialised = true; }