From f192b92ad382d9e8b89ac836bde96f8973ea2844 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sat, 6 Jul 2024 03:24:43 +0530 Subject: bug fix: when last item is deleted, list doesn't refresh in EditInvoice --- src/views/EditInvoice.vue | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/views') diff --git a/src/views/EditInvoice.vue b/src/views/EditInvoice.vue index 1ea9664..fe749ea 100644 --- a/src/views/EditInvoice.vue +++ b/src/views/EditInvoice.vue @@ -51,6 +51,8 @@ const refreshItems = async () => { const res = await axios.get(`/invoice/${invoiceId}/item`) if (res.status === 200) { items.value = calculateArr(res.data.data) + } else if (res.status == 204) { + items.value = [] } } catch (err) { toast.error('An unhandled exception occoured. Please check logs') -- cgit v1.2.3