Skip to content

Commit e504f8e

Browse files
daiyamRokt33r
authored andcommitted
fix broken nord and vulcan themes
1 parent 071ce12 commit e504f8e

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

browser/main/lib/ThemeManager.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import ConfigManager from 'browser/main/lib/ConfigManager'
2+
import uiThemes from 'browser/lib/ui-themes'
23

34
const saveChanges = newConfig => {
45
ConfigManager.set(newConfig)
@@ -40,14 +41,7 @@ const chooseTheme = config => {
4041
}
4142

4243
const applyTheme = theme => {
43-
const supportedThemes = [
44-
'dark',
45-
'white',
46-
'solarized-dark',
47-
'monokai',
48-
'dracula'
49-
]
50-
if (supportedThemes.indexOf(theme) !== -1) {
44+
if (uiThemes.some(item => item.name === theme)) {
5145
document.body.setAttribute('data-theme', theme)
5246
if (document.body.querySelector('.MarkdownPreview')) {
5347
document.body

0 commit comments

Comments
 (0)