Skip to content

Commit ee4dc4b

Browse files
committed
preserve params
1 parent 16e39f4 commit ee4dc4b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/sim/lib/billing/client/upgrade.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ export function useSubscriptionUpgrade() {
8181
}
8282

8383
const currentUrl = `${window.location.origin}${window.location.pathname}`
84-
const successUrl = `${currentUrl}?upgraded=true`
84+
const successUrlObj = new URL(window.location.href)
85+
successUrlObj.searchParams.set('upgraded', 'true')
86+
const successUrl = successUrlObj.toString()
8587

8688
try {
8789
const upgradeParams = {

0 commit comments

Comments
 (0)