about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-06-14 23:07:06 +0200
committerGitHub <noreply@github.com>2017-06-14 23:07:06 +0200
commitbb911043de61580e33ad617270bae2abc21bad55 (patch)
tree093113905c16603ab041e1ec2591f6422e3ba3e4 /app
parentda0333f1cb62c2f06ae400d1d238f49bd920321a (diff)
Fix regression from #3748 - properly set defaultColumns (#3750)
Diffstat (limited to 'app')
-rw-r--r--app/javascript/mastodon/reducers/settings.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/app/javascript/mastodon/reducers/settings.js b/app/javascript/mastodon/reducers/settings.js
index 35698ef82..ddad7a4fc 100644
--- a/app/javascript/mastodon/reducers/settings.js
+++ b/app/javascript/mastodon/reducers/settings.js
@@ -60,12 +60,7 @@ const defaultColumns = Immutable.fromJS([
   { id: 'NOTIFICATIONS', uuid: uuid(), params: {} },
 ]);
 
-const hydrate = (settings) => {
-  return initialState.withMutations((state) => {
-    state.mergeDeep(settings);
-    state.update('columns', defaultColumns, val => val);
-  });
-};
+const hydrate = (state, settings) => state.mergeDeep(settings).update('columns', (val = defaultColumns) => val);
 
 const moveColumn = (state, uuid, direction) => {
   const columns  = state.get('columns');
@@ -83,7 +78,7 @@ const moveColumn = (state, uuid, direction) => {
 export default function settings(state = initialState, action) {
   switch(action.type) {
   case STORE_HYDRATE:
-    return hydrate(action.state.get('settings'));
+    return hydrate(state, action.state.get('settings'));
   case SETTING_CHANGE:
     return state.setIn(action.key, action.value);
   case COLUMN_ADD: