Skip to content

Commit

Permalink
Fix sharing crash when config is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
frantic committed Apr 26, 2016
1 parent 9fe3092 commit b868731
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions js/reducers/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ const initialState: Config = {
function config(state: Config = initialState, action: Action): Config {
if (action.type === 'LOADED_CONFIG') {
return {
wifiNetwork: action.config.get('wifiNetwork'),
wifiPassword: action.config.get('wifiPassword'),
appLinkURL: action.config.get('appLinkURL'),
appInvitePreviewImageURL: action.config.get('appInvitePreviewImageURL'),
sessionURLTemplate: action.config.get('sessionURLTemplate'),
wifiNetwork: action.config.get('wifiNetwork') || state.wifiNetwork,
wifiPassword: action.config.get('wifiPassword') || state.wifiPassword,
appLinkURL: action.config.get('appLinkURL') || state.appLinkURL,
appInvitePreviewImageURL: action.config.get('appInvitePreviewImageURL') ||
state.appInvitePreviewImageURL,
sessionURLTemplate: action.config.get('sessionURLTemplate') ||
state.sessionURLTemplate,
};
}

Expand Down

0 comments on commit b868731

Please sign in to comment.