change(tracker): remove unused

This commit is contained in:
sylenien 2022-08-30 14:35:08 +02:00
parent 7aa658b59a
commit 0b96da6029
3 changed files with 5 additions and 6 deletions

View file

@ -291,11 +291,11 @@ export default class App {
return this.session.getInfo().sessionID || undefined
}
getSessionURL(): string {
getSessionURL(): string | undefined {
const { projectID, sessionID } = this.session.getInfo()
if (!projectID || !sessionID) {
this.debug.error('OpenReplay error: Unable to build session URL')
return ''
return undefined
}
return this.options.ingestPoint.replace(/\/ingest$/, `${projectID}/session/${sessionID}`)

View file

@ -21,9 +21,8 @@ export default class Session {
private readonly callbacks: OnUpdateCallback[] = []
private timestamp = 0
private projectID: string | undefined
private sessionUrl: string
constructor(private readonly app: App, private options: Options) {}
constructor(private readonly app: App, private readonly options: Options) {}
attachUpdateCallback(cb: OnUpdateCallback) {
this.callbacks.push(cb)

View file

@ -209,9 +209,9 @@ export default class API {
return this.getSessionID()
}
getSessionURL(): string | null {
getSessionURL(): string | undefined {
if (this.app === null) {
return null
return undefined
}
return this.app.getSessionURL()
}