diff --git a/2-copy-of-code/lesson-18/scripts/checkout/paymentSummary.js b/2-copy-of-code/lesson-18/scripts/checkout/paymentSummary.js index 6a36498..20fd809 100644 --- a/2-copy-of-code/lesson-18/scripts/checkout/paymentSummary.js +++ b/2-copy-of-code/lesson-18/scripts/checkout/paymentSummary.js @@ -85,10 +85,11 @@ export function renderPaymentSummary() { const order = await response.json(); addOrder(order); + window.location.href = 'orders.html'; + } catch (error) { console.log('Unexpected error. Try again later.'); } - window.location.href = 'orders.html'; }); -} \ No newline at end of file +}