From 974477cb498df4fc08b332a1b2800be55b88a62f Mon Sep 17 00:00:00 2001 From: Lykin <137850705+tiny-craft@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:54:05 +0800 Subject: [PATCH] fix: maximum call stack size exceeded (#234) --- frontend/src/stores/tab.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/stores/tab.js b/frontend/src/stores/tab.js index 9a73e96..65eb9e2 100644 --- a/frontend/src/stores/tab.js +++ b/frontend/src/stores/tab.js @@ -244,7 +244,11 @@ const useTabStore = defineStore('tab', { if (!!!reset && typeof value === 'object') { if (value instanceof Array) { tabData.value = tabData.value || [] - tabData.value.push(...value) + // direct deconstruction leads to 'Maximum call stack size exceeded'? + // tabData.value.push(...value) + for (let i = 0; i < value.length; i++) { + tabData.value.push(value[i]) + } } else { tabData.value = assign(value, tabData.value || {}) }