If value truthy then set

This commit is contained in:
Michaela Brydon 2024-11-26 13:33:42 -05:00
parent 6173799884
commit f1df4cc69a

View file

@ -566,7 +566,9 @@ export const useMainStore = defineStore({
const insured = responsePolicy.insureds?.[0];
// populate parent account number
order.parentAccountNumber = responsePolicy.accountNumber;
if (responsePolicy.accountNumber) {
order.parentAccountNumber = responsePolicy.accountNumber;
}
// populate policy holder details from policy lookup
order.customer.address.streetAddress = insured?.address;