Skip to content

Commit

Permalink
webui: the value we want to take effect should be last in destructure…
Browse files Browse the repository at this point in the history
…d object
  • Loading branch information
KKoukiou committed Jun 27, 2023
1 parent 6f604b5 commit 8151dd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/webui/src/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const reducer = (state, action) => {

export const storageReducer = (state = storageInitialState, action) => {
if (action.type === "GET_DEVICE_DATA") {
return { ...state, devices: { ...action.payload.deviceData, ...state.devices } };
return { ...state, devices: { ...state.devices, ...action.payload.deviceData } };
} else if (action.type === "GET_DISK_SELECTION") {
return { ...state, diskSelection: action.payload.diskSelection };
} else {
Expand All @@ -77,7 +77,7 @@ export const storageReducer = (state = storageInitialState, action) => {

export const localizationReducer = (state = localizationInitialState, action) => {
if (action.type === "GET_LANGUAGE_DATA") {
return { ...state, languages: { ...action.payload.languageData, ...state.languages } };
return { ...state, languages: { ...state.languages, ...action.payload.languageData } };
} else if (action.type === "GET_COMMON_LOCALES") {
return { ...state, commonLocales: action.payload.commonLocales };
} else {
Expand Down

0 comments on commit 8151dd1

Please sign in to comment.