fix(tracker-assist):4.1.3:agents reconnection on new page(no agentInfo)
This commit is contained in:
parent
3d8ad1a625
commit
5d77f8439c
1 changed files with 4 additions and 3 deletions
|
|
@ -49,7 +49,7 @@ type OptionalCallback = (()=>Record<string, unknown>) | void
|
|||
type Agent = {
|
||||
onDisconnect?: OptionalCallback,
|
||||
onControlReleased?: OptionalCallback,
|
||||
agentInfo: Record<string, string>
|
||||
agentInfo: Record<string, string> | undefined
|
||||
//
|
||||
}
|
||||
|
||||
|
|
@ -229,9 +229,10 @@ export default class Assist {
|
|||
})
|
||||
socket.on('AGENTS_CONNECTED', (ids: string[]) => {
|
||||
ids.forEach(id =>{
|
||||
const agentInfo = this.agents[id]?.agentInfo
|
||||
this.agents[id] = {
|
||||
...this.agents[id],
|
||||
onDisconnect: this.options.onAgentConnect?.( this.agents[id].agentInfo),
|
||||
agentInfo,
|
||||
onDisconnect: this.options.onAgentConnect?.(agentInfo),
|
||||
}
|
||||
})
|
||||
this.assistDemandedRestart = true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue