Skip to content

Commit 6d8270d

Browse files
authored
Fix bug of using props before declaration in CategoryModal.vue
1 parent f5ae2c6 commit 6d8270d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: backend/src/views/Categories/CategoryModal.vue

+7-7
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,6 @@ import CustomInput from "../../components/core/CustomInput.vue";
8181
import store from "../../store/index.js";
8282
import Spinner from "../../components/core/Spinner.vue";
8383

84-
const category = ref({
85-
id: props.category.id,
86-
name: props.category.name,
87-
active: props.category.active,
88-
parent_id: props.category.parent_id,
89-
})
90-
9184
const loading = ref(false)
9285
const errors = ref({})
9386

@@ -98,6 +91,13 @@ const props = defineProps({
9891
type: Object,
9992
}
10093
})
94+
95+
const category = ref({
96+
id: props.category.id,
97+
name: props.category.name,
98+
active: props.category.active,
99+
parent_id: props.category.parent_id,
100+
})
101101

102102
const emit = defineEmits(['update:modelValue', 'close'])
103103

0 commit comments

Comments
 (0)