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