diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index ab4e2e0da..b12a9f7b8 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -202,7 +202,7 @@ function formatValue(value) { function sanitizer(params) { for (const [key, value] of Object.entries(params)) { if (typeof value == 'object') - params[key] = Object.values(value)[0].replaceAll('%', ''); + params[key] = Object.values(value)?.[0]?.replaceAll('%', ''); } return params; } diff --git a/src/pages/Item/Card/ItemBotanical.vue b/src/pages/Item/Card/ItemBotanical.vue index 416c7f78b..599cd2b32 100644 --- a/src/pages/Item/Card/ItemBotanical.vue +++ b/src/pages/Item/Card/ItemBotanical.vue @@ -19,15 +19,6 @@ const itemSpeciesOptions = ref([]); const itemBotanicals = ref([]); let itemBotanicalsForm = reactive({ itemFk: null }); -const onGenusCreated = (response, formData) => { - itemGenusOptions.value = [...itemGenusOptions.value, response]; - formData.genusFk = response.id; -}; - -const onSpecieCreated = (response, formData) => { - itemSpeciesOptions.value = [...itemSpeciesOptions.value, response]; - formData.specieFk = response.id; -}; const entityId = computed(() => { return route.params.id; }); @@ -69,36 +60,35 @@ onMounted(async () => {