Skip to content

Commit

Permalink
refactor(payment-link): use shouldRemoveBeforeUnloadEvents flag for h…
Browse files Browse the repository at this point in the history
…andling removal of beforeunload events through SDK (#7072)

(cherry picked from commit 776ed9a)
  • Loading branch information
kashif-m committed Jan 20, 2025
1 parent ce4c59a commit 40eb9a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ function initializeSDK() {
// @ts-ignore
hyper = window.Hyper(pub_key, {
isPreloadEnabled: false,
// TODO: Remove in next deployment
shouldUseTopRedirection: true,
redirectionFlags: {
shouldRemoveBeforeUnloadEvents: true,
shouldUseTopRedirection: true,
}
});
// @ts-ignore
widgets = hyper.widgets({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ if (!isFramed) {
// @ts-ignore
hyper = window.Hyper(pub_key, {
isPreloadEnabled: false,
// TODO: Remove in next deployment
shouldUseTopRedirection: true,
redirectionFlags: {
shouldRemoveBeforeUnloadEvents: true,
shouldUseTopRedirection: true,
}
});
// @ts-ignore
widgets = hyper.widgets({
Expand Down

0 comments on commit 40eb9a5

Please sign in to comment.