fix: maximum call stack size exceeded (#234)
This commit is contained in:
parent
1bf4b0eee1
commit
974477cb49
|
@ -244,7 +244,11 @@ const useTabStore = defineStore('tab', {
|
||||||
if (!!!reset && typeof value === 'object') {
|
if (!!!reset && typeof value === 'object') {
|
||||||
if (value instanceof Array) {
|
if (value instanceof Array) {
|
||||||
tabData.value = tabData.value || []
|
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 {
|
} else {
|
||||||
tabData.value = assign(value, tabData.value || {})
|
tabData.value = assign(value, tabData.value || {})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue