diff --git a/store/index.js b/store/index.js index 09a7b07e..7e87044f 100644 --- a/store/index.js +++ b/store/index.js @@ -41,10 +41,10 @@ export const state = () => ({ export const getters = { hide_thumbs (state) { - return (state.localSettings['hide_thumbs'] === null) ? state.settings.hide_thumbs : state.localSettings.hide_thumbs + return (![true, false].includes(state.localSettings['hide_thumbs'])) ? state.settings.hide_thumbs : state.localSettings.hide_thumbs }, is_dark (state) { - return (state.localSettings['theme.is_dark'] === null) ? state.settings['theme.is_dark'] : state.localSettings['theme.is_dark'] + return (![true, false].includes(state.localSettings['theme.is_dark'])) ? state.settings['theme.is_dark'] : state.localSettings['theme.is_dark'] } } @@ -73,9 +73,10 @@ export const actions = { // this method is called server side only for each request for nuxt // we use it to get configuration from db, set locale, etc... nuxtServerInit ({ commit }, { res, app }) { - + console.error('dentro nuxtServerInit ', res.locals) if (res.locals && res.locals.settings) { commit('setSettings', res.locals.settings) + console.error(`SETTINGS: ${res.locals.settings}`) } commit('setFilter', { type: 'show_recurrent', value: res.locals.settings.allow_recurrent_event && res.locals.settings.recurrent_event_visible })