diff options
Diffstat (limited to 'app/javascript/mastodon/containers/mastodon.js')
-rw-r--r-- | app/javascript/mastodon/containers/mastodon.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/javascript/mastodon/containers/mastodon.js b/app/javascript/mastodon/containers/mastodon.js index 87ab6023c..8287375c4 100644 --- a/app/javascript/mastodon/containers/mastodon.js +++ b/app/javascript/mastodon/containers/mastodon.js @@ -23,7 +23,13 @@ const { localeData, messages } = getLocale(); addLocaleData(localeData); export const store = configureStore(); -const hydrateAction = hydrateStore(JSON.parse(document.getElementById('initial-state').textContent)); +const initialState = JSON.parse(document.getElementById('initial-state').textContent); +try { + initialState.local_settings = JSON.parse(localStorage.getItem('mastodon-settings')); +} catch (e) { + initialState.local_settings = {}; +} +const hydrateAction = hydrateStore(initialState); store.dispatch(hydrateAction); export default class Mastodon extends React.PureComponent { |