From 267686230b729f24fb873b6c8b58a7f62d827369 Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 1 Aug 2023 11:08:42 +0200 Subject: [PATCH 1/2] identify files by path --- packages/web-app-files/src/store/mutations.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/web-app-files/src/store/mutations.ts b/packages/web-app-files/src/store/mutations.ts index ca0688e4066..493dec87e52 100644 --- a/packages/web-app-files/src/store/mutations.ts +++ b/packages/web-app-files/src/store/mutations.ts @@ -154,8 +154,9 @@ export default { $_upsertResource(state, resource, true) }, + UPSERT_RESOURCES(state, resources) { - const otherFiles = state.files.filter((f) => !resources.some((r) => r.id === f.id)) + const otherFiles = state.files.filter((f) => !resources.some((r) => r.path === f.path)) state.files = [...otherFiles, ...resources] }, From a7f788a6c50843e79cf1f161a25d13a8878826b5 Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 1 Aug 2023 11:09:22 +0200 Subject: [PATCH 2/2] Rm new line --- packages/web-app-files/src/store/mutations.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/web-app-files/src/store/mutations.ts b/packages/web-app-files/src/store/mutations.ts index 493dec87e52..b66b929fa91 100644 --- a/packages/web-app-files/src/store/mutations.ts +++ b/packages/web-app-files/src/store/mutations.ts @@ -154,7 +154,6 @@ export default { $_upsertResource(state, resource, true) }, - UPSERT_RESOURCES(state, resources) { const otherFiles = state.files.filter((f) => !resources.some((r) => r.path === f.path)) state.files = [...otherFiles, ...resources]