Skip to content

Commit

Permalink
Trap an error on Preferences
Browse files Browse the repository at this point in the history
* Prevents server trip until DB can be cleansed

Applies to OpenUserJS#1369
  • Loading branch information
Martii committed May 22, 2018
1 parent 3d244ee commit f04e706
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ exports.userEditPreferencesPage = function (aReq, aRes, aNext) {
return aStrategy.display;
});

options.defaultStrategy = strategies[defaultStrategy].name;
options.defaultStrategy = strategies[defaultStrategy] ? strategies[defaultStrategy].name : null;
options.defaultStrat = defaultStrategy;
options.haveOtherStrategies = options.usedStrategies.length > 0;

Expand Down

0 comments on commit f04e706

Please sign in to comment.