diff --git a/apps/storefront/src/pages/invoice/utils/pdf.ts b/apps/storefront/src/pages/invoice/utils/pdf.ts index bf2f8172..4f0f0ee5 100644 --- a/apps/storefront/src/pages/invoice/utils/pdf.ts +++ b/apps/storefront/src/pages/invoice/utils/pdf.ts @@ -31,13 +31,14 @@ export const handlePrintPDF = async ( invoiceId: string, isPayNow = false ): Promise => { + let url = '' try { - const url = await getInvoiceDownloadPDFUrl(invoiceId, isPayNow) + url = await getInvoiceDownloadPDFUrl(invoiceId, isPayNow) const pdfUrl = await analyzePDFUrl(url) return pdfUrl } catch (error) { - return '' + return url } }