fix(tracker): fix for {disableStringDict: true}

This commit is contained in:
nick-delirium 2023-09-25 16:08:47 +02:00
parent eae4513168
commit 7422a4919f
3 changed files with 14 additions and 9 deletions

View file

@ -1,3 +1,7 @@
# 9.0.9
- Fix for `{disableStringDict: true}` behavior
# 9.0.8
- added slight delay to iframe handler (rapid updates of stacked frames used to break player)

View file

@ -1,7 +1,7 @@
{
"name": "@openreplay/tracker",
"description": "The OpenReplay tracker main package",
"version": "9.0.8",
"version": "9.0.9",
"keywords": [
"logging",
"replay"

View file

@ -23,15 +23,16 @@ export default class AttributeSender {
public sendSetAttribute(id: number, name: string, value: string) {
if (this.isDictDisabled) {
const msg: SetNodeAttribute = [Type.SetNodeAttribute, id, name, value]
this.app.send(msg)
return this.app.send(msg)
} else {
const message: SetNodeAttributeDict = [
Type.SetNodeAttributeDict,
id,
this.applyDict(name),
this.applyDict(value),
]
return this.app.send(message)
}
const message: SetNodeAttributeDict = [
Type.SetNodeAttributeDict,
id,
this.applyDict(name),
this.applyDict(value),
]
this.app.send(message)
}
private applyDict(str: string): number {