fix(tracker): no sess-reset on start
This commit is contained in:
parent
5077843305
commit
1890ff2af1
2 changed files with 4 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@openreplay/tracker",
|
||||
"description": "The OpenReplay tracker main package",
|
||||
"version": "4.1.3",
|
||||
"version": "4.1.4",
|
||||
"keywords": [
|
||||
"logging",
|
||||
"replay"
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ export default class App {
|
|||
this._debug('worker_failed', {}) // add context (from worker)
|
||||
} else if (data === 'restart') {
|
||||
this.stop(false)
|
||||
this.start({ forceNew: true })
|
||||
this.start({ forceNew: true }) // TODO: keep userID & metadata (draw scenarios)
|
||||
}
|
||||
}
|
||||
const alertWorker = () => {
|
||||
|
|
@ -447,7 +447,8 @@ export default class App {
|
|||
) {
|
||||
return Promise.reject(`Incorrect server response: ${JSON.stringify(r)}`)
|
||||
}
|
||||
if (sessionID !== this.session.getInfo().sessionID) {
|
||||
const prevSessionID = this.session.getInfo().sessionID
|
||||
if (prevSessionID && prevSessionID !== sessionID) {
|
||||
this.session.reset()
|
||||
}
|
||||
this.session.setSessionToken(token)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue