From d71ca4ffb96dc110451152678455f4eaaacd5d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20M=C3=BCller?= Date: Sat, 1 Feb 2020 14:52:07 +0100 Subject: [PATCH] Fixed small bug that might occur when an expense is updated Previoulsy a string with contents "null" is transmitted and saved to the database when updating an expense with an empty note. This fix prevents that. Please note that this fix still needs to be compiled with npm. --- resources/assets/js/views/expenses/Create.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/js/views/expenses/Create.vue b/resources/assets/js/views/expenses/Create.vue index bcd57434..1acdecc7 100644 --- a/resources/assets/js/views/expenses/Create.vue +++ b/resources/assets/js/views/expenses/Create.vue @@ -321,7 +321,7 @@ export default { data.append('expense_category_id', this.formData.expense_category_id) data.append('expense_date', moment(this.formData.expense_date).format('DD/MM/YYYY')) data.append('amount', (this.formData.amount)) - data.append('notes', this.formData.notes) + data.append('notes', this.formData.notes ? this.formData.notes : '') if (this.isEdit) { this.isLoading = true