make final deductible call only if successful policy lookup

This commit is contained in:
Katie Kroell 2023-11-15 16:02:20 -05:00
parent f471a812e2
commit 9465191553

View file

@ -147,7 +147,10 @@ export default {
// Call APIs
const cmsContentPromise = fetchCmsContentForPage(to?.query?.issPage);
const supportingItemsPromise = await useMainStore().getSupportingItems();
const finalDeductiblePromise = await useMainStore().getFinalDeductible();
let finalDeductiblePromise = '';
if (useMainStore().order.policyLookupSuccessful) {
finalDeductiblePromise = await useMainStore().getFinalDeductible();
}
// Settle promises and get results
const promiseResultMap = [