|
@@ -450,19 +450,25 @@ function activateNotebookHandler(app: JupyterLab, mainMenu: IMainMenu, palette:
|
|
|
settings.get('codeCellConfig').composite as Partial<CodeEditor.IConfig>;
|
|
|
let code = { ...StaticNotebook.defaultEditorConfig.code };
|
|
|
Object.keys(code).forEach((key: keyof CodeEditor.IConfig) => {
|
|
|
- code[key] = cached[key] === null ? code[key] : cached[key];
|
|
|
+ code[key] = (cached[key] === null || cached[key] === undefined)
|
|
|
+ ? code[key]
|
|
|
+ : cached[key];
|
|
|
});
|
|
|
cached =
|
|
|
settings.get('markdownCellConfig').composite as Partial<CodeEditor.IConfig>;
|
|
|
let markdown = { ...StaticNotebook.defaultEditorConfig.markdown };
|
|
|
Object.keys(markdown).forEach((key: keyof CodeEditor.IConfig) => {
|
|
|
- markdown[key] = cached[key] === null ? markdown[key] : cached[key];
|
|
|
+ markdown[key] = (cached[key] === null || cached[key] === undefined)
|
|
|
+ ? markdown[key]
|
|
|
+ : cached[key];
|
|
|
});
|
|
|
cached =
|
|
|
settings.get('rawCellConfig').composite as Partial<CodeEditor.IConfig>;
|
|
|
let raw = { ...StaticNotebook.defaultEditorConfig.raw };
|
|
|
Object.keys(raw).forEach((key: keyof CodeEditor.IConfig) => {
|
|
|
- raw[key] = cached[key] === null ? raw[key] : cached[key];
|
|
|
+ raw[key] = (cached[key] === null || cached[key] === undefined)
|
|
|
+ ? raw[key]
|
|
|
+ : cached[key];
|
|
|
});
|
|
|
factory.editorConfig = editorConfig = { code, markdown, raw };
|
|
|
}
|