1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

Fixes in order to handle default setting

This commit is contained in:
asmsuechan
2017-01-07 23:51:37 +09:00
parent ee6d41859f
commit 7437b26e3c

View File

@@ -184,7 +184,7 @@ export default class MarkdownPreview extends React.Component {
}
setCodeTheme (theme) {
theme = consts.THEMES.some((_theme) => _theme === theme)
theme = consts.THEMES.some((_theme) => _theme === theme) && theme !== 'default'
? theme
: 'elegant'
this.getWindow().document.getElementById('codeTheme').href = `${appPath}/node_modules/codemirror/theme/${theme}.css`