From 5a5f6bf5e89d11f29a40bfbce751adbed587b099 Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Wed, 2 Oct 2024 12:23:47 -0700 Subject: [PATCH] Mutate growl stack in a reactive way Signed-off-by: Phillip Rak --- shell/store/growl.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/shell/store/growl.js b/shell/store/growl.js index 288da26ec82..fa3a2a09af8 100644 --- a/shell/store/growl.js +++ b/shell/store/growl.js @@ -18,11 +18,14 @@ export const getters = { export const mutations = { add(state, data) { - state.stack.push({ - id: state.nextId++, - started: (new Date().getTime()), - ...data - }); + state.stack = [ + ...state.stack, + { + id: state.nextId++, + started: (new Date().getTime()), + ...data + } + ]; }, remove(state, id) {