summaryrefslogtreecommitdiff
path: root/frontend/api/crud.reducer.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/api/crud.reducer.js')
-rw-r--r--frontend/api/crud.reducer.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/api/crud.reducer.js b/frontend/api/crud.reducer.js
index baf2536..dd1fe48 100644
--- a/frontend/api/crud.reducer.js
+++ b/frontend/api/crud.reducer.js
@@ -115,12 +115,12 @@ export const crudReducer = (type) => {
...state,
update: action.data,
index: addToIndex(state.index, action.data.res, state.options.sort),
- show: {
+ show: (state.show && state.show.res) ? {
res: (state.show.res.id === action.data.res.id ? {
...state.show.res,
...action.data.res,
} : state.show.res),
- }
+ } : {}
}
case crud_type.index_error:
return {