From 7daf95a53ff97f88d3a6b5aaf526e33cb6d2992e Mon Sep 17 00:00:00 2001 From: Johann Rudloff Date: Mon, 3 Apr 2023 21:56:20 +0200 Subject: [PATCH] Close details sidebar if edited chore ID does not exist --- src/views/ChoreDetailsSidebar.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/views/ChoreDetailsSidebar.vue b/src/views/ChoreDetailsSidebar.vue index 65d0bbe..6cd6635 100644 --- a/src/views/ChoreDetailsSidebar.vue +++ b/src/views/ChoreDetailsSidebar.vue @@ -223,6 +223,9 @@ export default { }; } const chore = this.store.choreById(Number(this.$props.choreId)); + if (chore === undefined) { + this.closeSideBar(); + } return chore || {repeat:'s:1:-', due: new Date(), id:-1}; }, due: { -- 2.45.2