aboutsummaryrefslogtreecommitdiff
path: root/modern/src/store/maintenances.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-12-11 20:41:31 -0800
committerAnton Tananaev <anton@traccar.org>2023-12-11 20:41:31 -0800
commit7d607dbc8f2f5636dd1319ff018add3265c923aa (patch)
treeaca67555548e463126a01d1d73314ebd975ae151 /modern/src/store/maintenances.js
parent3b38142f4ef581c76ec089d430cda86337609bc1 (diff)
downloadtrackermap-web-7d607dbc8f2f5636dd1319ff018add3265c923aa.tar.gz
trackermap-web-7d607dbc8f2f5636dd1319ff018add3265c923aa.tar.bz2
trackermap-web-7d607dbc8f2f5636dd1319ff018add3265c923aa.zip
Fix store refresh
Diffstat (limited to 'modern/src/store/maintenances.js')
-rw-r--r--modern/src/store/maintenances.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/modern/src/store/maintenances.js b/modern/src/store/maintenances.js
index 08b2adb6..0f5e41d1 100644
--- a/modern/src/store/maintenances.js
+++ b/modern/src/store/maintenances.js
@@ -6,7 +6,8 @@ const { reducer, actions } = createSlice({
items: {},
},
reducers: {
- update(state, action) {
+ refresh(state, action) {
+ state.items = {};
action.payload.forEach((item) => state.items[item.id] = item);
},
},