From 0d3208e0e6ea20ad92abd17acf9f5dfa0ed369b0 Mon Sep 17 00:00:00 2001 From: Marc Rufener Date: Fri, 22 Dec 2023 15:55:29 +0100 Subject: [PATCH] fix error when deleting new document without id --- front/src/components/DocumentsTable.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/front/src/components/DocumentsTable.vue b/front/src/components/DocumentsTable.vue index 3123ee2..990bdb1 100644 --- a/front/src/components/DocumentsTable.vue +++ b/front/src/components/DocumentsTable.vue @@ -131,7 +131,9 @@ export default { }, async deleteRessource(ressource) { this.documents = this.documents.filter(x => x.filename !== ressource.filename) - store.deleteDocument(ressource.id) + if (ressource.id !== undefined) { + store.deleteDocument(ressource.id) + } }, } }