refactor(payment-link): use shouldRemoveBeforeUnloadEvents flag for handling removal of beforeunload events through SDK (#7072)

This commit is contained in:
Kashif
2025-01-20 18:53:35 +05:30
committed by GitHub
parent e9fcfc4560
commit 776ed9a2eb
2 changed files with 10 additions and 0 deletions

View File

@ -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({

View File

@ -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({