From d9f79b2d9d31e32be1d83b37e746fa357fe2fb12 Mon Sep 17 00:00:00 2001 From: Norman Mildner Date: Tue, 17 Feb 2026 12:09:26 +0100 Subject: [PATCH] fix: Merge views instead of resetting to avoid race condition Signed-off-by: Norman Mildner --- src/store/store.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/store/store.js b/src/store/store.js index bfadca4630..903378e25e 100644 --- a/src/store/store.js +++ b/src/store/store.js @@ -153,9 +153,14 @@ export const useTablesStore = defineStore('store', { try { const res = await axios.get(generateUrl('/apps/tables/table')) this.setTables(res.data) - this.views = [] res.data.forEach(table => { - if (table.views) this.views = this.views.concat(table.views) + if (table.views) { + table.views.forEach(view => { + if (this.views.filter(v => v.id === view.id).length === 0) { + this.views.push(view) + } + }) + } }) } catch (e) { displayError(e, t('tables', 'Could not load tables.'))