fix(captain): pricing modal null reference crash

This commit is contained in:
Rodrigo Borba 2026-01-13 14:33:58 -03:00
parent 0adc7e763b
commit 739e042406
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ const route = useRoute();
const accountId = route.params.accountId;
const openAddModal = () => {
selectedPricing.value = null;
selectedPricing.value = {};
showModal.value = true;
};

View File

@ -70,7 +70,7 @@ const parseDays = rangeString => {
.filter(s => daysOptions.includes(s));
};
const isEditing = computed(() => !!props.pricing.id); // Changed to check for pricing.id to correctly identify editing mode
const isEditing = computed(() => !!props.pricing?.id); // Changed to check for pricing.id to correctly identify editing mode
const selectedBrand = computed(() => {
return props.brands.find(b => b.id === formData.value.captain_brand_id);