From 812d4ee6b21196991b2ec7cc156e0628324ded83 Mon Sep 17 00:00:00 2001 From: Natty Date: Fri, 5 Apr 2024 23:33:33 +0200 Subject: [PATCH] Fixed more accidental array mutations --- .../frontend/client/src/components/MagNotifications.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fe_calckey/frontend/client/src/components/MagNotifications.vue b/fe_calckey/frontend/client/src/components/MagNotifications.vue index a3d608c..92c9a10 100644 --- a/fe_calckey/frontend/client/src/components/MagNotifications.vue +++ b/fe_calckey/frontend/client/src/components/MagNotifications.vue @@ -493,11 +493,12 @@ const prepend = (item: packed.PackNotification): void => { } else { if (!queue.value.length) { onScrollTop(rootEl.value, () => { + const queueRemoved = [...queue.value].reverse(); + queue.value = []; items.value = [ - ...groupIntra(queue.value.reverse()), + ...groupIntra(queueRemoved), ...items.value, ].slice(0, displayLimit); - queue.value = []; }); }