Skip to content

Commit

Permalink
Fix bug of using props before declaration in CategoryModal.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodeholic authored Aug 15, 2024
1 parent f5ae2c6 commit 6d8270d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions backend/src/views/Categories/CategoryModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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({})

Expand All @@ -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'])

Expand Down

0 comments on commit 6d8270d

Please sign in to comment.