fix: ability to open a new tab on iOS Safari (#1516)
* fix: ability to open a new tab on iOS Safari * chore: fix `https deprecation` warning * chore: better variable naming
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import { SNApplication } from '@standardnotes/snjs'
|
||||
|
||||
export function openSubscriptionDashboard(application: SNApplication): void {
|
||||
const windowProxy = window.open('', '_blank')
|
||||
application
|
||||
.getNewSubscriptionToken()
|
||||
.then((token) => {
|
||||
if (!token) {
|
||||
return
|
||||
}
|
||||
window.open(`${window.dashboardUrl}?subscription_token=${token}`)
|
||||
;(windowProxy as WindowProxy).location = `${window.dashboardUrl}?subscription_token=${token}`
|
||||
})
|
||||
.catch(console.error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user