From 6d8270d528148ba3589d9e1f9f084d58fd346e0f Mon Sep 17 00:00:00 2001 From: TheCodeholic Date: Thu, 15 Aug 2024 10:56:22 +0400 Subject: [PATCH] Fix bug of using props before declaration in CategoryModal.vue --- backend/src/views/Categories/CategoryModal.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/src/views/Categories/CategoryModal.vue b/backend/src/views/Categories/CategoryModal.vue index a72f556..7dc90a7 100644 --- a/backend/src/views/Categories/CategoryModal.vue +++ b/backend/src/views/Categories/CategoryModal.vue @@ -81,13 +81,6 @@ import CustomInput from "../../components/core/CustomInput.vue"; import store from "../../store/index.js"; import Spinner from "../../components/core/Spinner.vue"; -const category = ref({ - id: props.category.id, - name: props.category.name, - active: props.category.active, - parent_id: props.category.parent_id, -}) - const loading = ref(false) const errors = ref({}) @@ -98,6 +91,13 @@ const props = defineProps({ type: Object, } }) + +const category = ref({ + id: props.category.id, + name: props.category.name, + active: props.category.active, + parent_id: props.category.parent_id, +}) const emit = defineEmits(['update:modelValue', 'close'])