File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ import filter from 'redux-storage-decorator-filter';
99import { checkHasStarred , UPDATE_SETTING , LOGIN , LOGOUT } from '../actions' ;
1010import { restoreSettings } from '../utils/comms' ;
1111import constants from '../utils/constants' ;
12- import notifications from '../middleware/notifications' ;
13- import settings from '../middleware/settings' ;
12+ import notificationsMiddlware from '../middleware/notifications' ;
13+ import settingsMiddleware from '../middleware/settings' ;
1414import rootReducer from '../reducers' ;
1515
1616const isDev = process . mainModule . filename . indexOf ( 'app.asar' ) === - 1 ;
@@ -26,8 +26,8 @@ export default function configureStore(initialState) {
2626
2727 const middlewares = [
2828 thunkMiddleware ,
29- notifications ,
30- settings ,
29+ notificationsMiddlware ,
30+ settingsMiddleware ,
3131 storageMiddleware
3232 ] ;
3333
@@ -47,8 +47,9 @@ export default function configureStore(initialState) {
4747 const load = storage . createLoader ( engine ) ;
4848 load ( store )
4949 . then ( newState => {
50- const isGitHubLoggedIn = ! ! newState . auth . token ;
51- const userSettings = Map ( newState . settings ) ;
50+ const { auth = { } , settings = { } } = newState ;
51+ const isGitHubLoggedIn = ! ! auth . token ;
52+ const userSettings = Map ( settings ) ;
5253
5354 restoreSettings ( userSettings ) ;
5455 if ( isGitHubLoggedIn ) {
You can’t perform that action at this time.
0 commit comments