diff options
Diffstat (limited to 'modern/src/store')
-rw-r--r-- | modern/src/store/geofences.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modern/src/store/geofences.js b/modern/src/store/geofences.js index c5e5814..504b7d0 100644 --- a/modern/src/store/geofences.js +++ b/modern/src/store/geofences.js @@ -6,6 +6,10 @@ const { reducer, actions } = createSlice({ items: {}, }, reducers: { + refresh(state, action) { + state.items = {}; + action.payload.forEach(item => state.items[item['id']] = item); + }, update(state, action) { action.payload.forEach(item => state.items[item['id']] = item); }, |