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

fix: default.css not found

This commit is contained in:
sota1235
2016-12-22 12:03:18 +09:00
parent b21a82ea6b
commit c11bd9e7eb
2 changed files with 5 additions and 5 deletions

View File

@@ -170,10 +170,10 @@ export default class MarkdownPreview extends React.Component {
}
setCodeTheme (theme) {
theme = consts.THEMES.some((_theme) => _theme === theme)
? theme
: 'default'
this.getWindow().document.getElementById('codeTheme').href = `${appPath}/node_modules/codemirror/theme/${theme}.css`
const pathToCss = consts.THEMES.some((_theme) => _theme === theme)
? `theme/${theme}.css`
: 'lib/codemirror.css'
this.getWindow().document.getElementById('codeTheme').href = `${appPath}/node_modules/codemirror/${pathToCss}`
}
rewriteIframe () {