aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-09-14 06:36:40 -0700
committerAnton Tananaev <anton@traccar.org>2023-09-14 06:36:40 -0700
commit925c51d94f25021cb4fbf77cee7b0cb7f611692b (patch)
tree6fcf7629ebeca8c845fe8bacc75056fa122073f4
parentf87566f0bdc7837cf6ac33eadecced1160d019bf (diff)
downloadtrackermap-web-925c51d94f25021cb4fbf77cee7b0cb7f611692b.tar.gz
trackermap-web-925c51d94f25021cb4fbf77cee7b0cb7f611692b.tar.bz2
trackermap-web-925c51d94f25021cb4fbf77cee7b0cb7f611692b.zip
Limit notifications buffer
-rw-r--r--modern/src/store/events.js1
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);