fix(tracker): sessionToken start option back compat

This commit is contained in:
Alex Kaminskii 2022-08-26 15:19:21 +02:00
parent a691658ac3
commit 6840213e77

View file

@ -88,7 +88,12 @@ export default class Session {
}
applySessionHash(hash: string) {
const [pageNoStr, token] = decodeURI(hash).split('&')
const hashParts = decodeURI(hash).split('&')
let token = hash
let pageNoStr = '100500' // back-compat for sessionToken
if (hashParts.length == 2) {
;[token, pageNoStr] = hashParts
}
if (!pageNoStr || !token) {
return
}