Skip to content

Commit

Permalink
fix error when deleting new document without id
Browse files Browse the repository at this point in the history
  • Loading branch information
rufener committed Dec 22, 2023
1 parent 12a8a8c commit 0d3208e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion front/src/components/DocumentsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
},
}
}
Expand Down

0 comments on commit 0d3208e

Please sign in to comment.