Skip to content

Commit

Permalink
Order initializer adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaschenko committed Nov 20, 2024
1 parent 9b19cf5 commit f9330d4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/initializers/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,14 @@ await initializeDropin(async () => {
isTokenProvided,
langDefinitions,
);
} else if (!checkIsAuthenticated()
&& !isTokenProvided
&& orderRef) {
} else if (!checkIsAuthenticated() && orderRef) {
events.on('order/error', () => {
if (isTokenProvided) {
window.location.href = ORDER_STATUS_PATH;
} else {
window.location.href = `${ORDER_STATUS_PATH}?orderRef=${orderRef}`;
}
});
await initializers.mountImmediately(initialize, {
langDefinitions,
orderRef,
Expand Down

0 comments on commit f9330d4

Please sign in to comment.