Make defaulting to pleroma-dark work when config.json has an invalid theme. Remove logging.

This commit is contained in:
shpuld 2017-11-18 13:27:37 +02:00
parent d65d6e5da4
commit 3534a9a62f
2 changed files with 1 additions and 5 deletions

View file

@ -121,7 +121,7 @@ const setPreset = (val, commit) => {
window.fetch('/static/styles.json')
.then((data) => data.json())
.then((themes) => {
const theme = themes[val] ? themes[val] : themes[0]
const theme = themes[val] ? themes[val] : themes['pleroma-dark']
const bgRgb = hex2rgb(theme[1])
const fgRgb = hex2rgb(theme[2])
const textRgb = hex2rgb(theme[3])