tracker: 15.1.1 fix attributeSender key gen

This commit is contained in:
nick-delirium 2025-03-17 11:32:51 +01:00
parent 9c6ef3182d
commit 999e5cba3a
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
4 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,7 @@
## 15.1.1
- fix for attributeSender dictionary keys
## 15.1.0
- move domparser for sprites under observer code for better SSR support

View file

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

View file

@ -12,12 +12,13 @@ export class StringDictionary {
getKey = (str: string): [string, boolean] => {
let isNew = false
if (!this.backDict[str]) {
const safeKey = `__${str}`
if (!this.backDict[safeKey]) {
isNew = true
this.backDict[str] = `${this.getPageNo() ?? 0}_${this.idx}`
this.backDict[safeKey] = `${this.getPageNo() ?? 0}_${this.idx}`
this.idx += 1
}
return [this.backDict[str], isNew]
return [this.backDict[safeKey], isNew]
}
}