diff options
author | Anton Tananaev <anton@traccar.org> | 2023-09-14 06:36:40 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-09-14 06:36:40 -0700 |
commit | 925c51d94f25021cb4fbf77cee7b0cb7f611692b (patch) | |
tree | 6fcf7629ebeca8c845fe8bacc75056fa122073f4 | |
parent | f87566f0bdc7837cf6ac33eadecced1160d019bf (diff) | |
download | trackermap-web-925c51d94f25021cb4fbf77cee7b0cb7f611692b.tar.gz trackermap-web-925c51d94f25021cb4fbf77cee7b0cb7f611692b.tar.bz2 trackermap-web-925c51d94f25021cb4fbf77cee7b0cb7f611692b.zip |
Limit notifications buffer
-rw-r--r-- | modern/src/store/events.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modern/src/store/events.js b/modern/src/store/events.js index d4f313c0..35e7081e 100644 --- a/modern/src/store/events.js +++ b/modern/src/store/events.js @@ -8,6 +8,7 @@ const { reducer, actions } = createSlice({ reducers: { add(state, action) { state.items.unshift(...action.payload); + state.items.splice(50); }, delete(state, action) { state.items = state.items.filter((item) => item.id !== action.payload.id); |