File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -113,13 +113,19 @@ export const updateUserPreferences = async (
113
113
) : Promise < boolean > => {
114
114
try {
115
115
let value : UserPreferencesPayloadValueType = null
116
- const { themePreference, appTheme, pipelineRBACViewSelectedTab } = updatedUserPreferences
117
- value = {
118
- viewPermittedEnvOnly : pipelineRBACViewSelectedTab === ViewIsPipelineRBACConfiguredRadioTabs . ACCESS_ONLY ,
119
- computedAppTheme : themePreference === THEME_PREFERENCE_MAP . auto ? `system-${ appTheme } ` : appTheme ,
116
+ if ( updatedUserPreferences ) {
117
+ const { themePreference, appTheme, pipelineRBACViewSelectedTab } = updatedUserPreferences
118
+
119
+ value = {
120
+ viewPermittedEnvOnly : pipelineRBACViewSelectedTab === ViewIsPipelineRBACConfiguredRadioTabs . ACCESS_ONLY ,
121
+ computedAppTheme : themePreference === THEME_PREFERENCE_MAP . auto ? `system-${ appTheme } ` : appTheme ,
122
+ }
120
123
}
124
+
121
125
if ( recentlyVisitedDevtronApps ?. length ) {
122
- value . resources = resourcesObj ( recentlyVisitedDevtronApps )
126
+ value = {
127
+ resources : resourcesObj ( recentlyVisitedDevtronApps ) ,
128
+ }
123
129
}
124
130
125
131
const payload : UpdateUserPreferencesPayloadType = {
You can’t perform that action at this time.
0 commit comments