DEV: Make interface route/controller more resilient to missing values
This commit is contained in:
parent
0d1fa54957
commit
60fa4fe692
|
@ -75,7 +75,7 @@ export default Ember.Controller.extend(PreferencesTabController, {
|
|||
|
||||
@computed("model.user_option.theme_ids", "themeId")
|
||||
showThemeSetDefault(userOptionThemes, selectedTheme) {
|
||||
return userOptionThemes[0] !== selectedTheme;
|
||||
return !userOptionThemes || userOptionThemes[0] !== selectedTheme;
|
||||
},
|
||||
|
||||
@computed("model.user_option.text_size", "textSize")
|
||||
|
|
|
@ -10,6 +10,7 @@ export default RestrictedUserRoute.extend({
|
|||
textSize: user.get("currentTextSize"),
|
||||
themeId: currentThemeId(),
|
||||
makeThemeDefault:
|
||||
!user.get("user_option.theme_ids") ||
|
||||
currentThemeId() === user.get("user_option.theme_ids")[0],
|
||||
makeTextSizeDefault:
|
||||
user.get("currentTextSize") === user.get("user_option.text_size")
|
||||
|
|
Loading…
Reference in New Issue