Skip to content

Commit 7ddfbf5

Browse files
authored
fix(payment_link): move redirection fn to global scope for open links (#5494)
1 parent 540ef07 commit 7ddfbf5

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

crates/router/src/core/payment_link/payment_link_initiate/payment_link_initiator.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ function initializeSDK() {
6868
setTimeout(() => {
6969
document.body.removeChild(shimmer);
7070
}, 500);
71+
}
7172

72-
/**
73-
* Use - redirect to /payment_link/status
74-
*/
75-
function redirectToStatus() {
76-
var arr = window.location.pathname.split("/");
77-
arr.splice(0, 2);
78-
arr.unshift("status");
79-
arr.unshift("payment_link");
80-
window.location.href = window.location.origin + "/" + arr.join("/");
81-
}
73+
/**
74+
* Use - redirect to /payment_link/status
75+
*/
76+
function redirectToStatus() {
77+
var arr = window.location.pathname.split("/");
78+
arr.splice(0, 2);
79+
arr.unshift("status");
80+
arr.unshift("payment_link");
81+
window.location.href = window.location.origin + "/" + arr.join("/");
8282
}

0 commit comments

Comments
 (0)