fix(tracker): some fixes for uxt

This commit is contained in:
nick-delirium 2023-12-11 17:22:18 +01:00
parent 4fb7fd0110
commit cb6a9de141
3 changed files with 14 additions and 9 deletions

View file

@ -51,7 +51,7 @@ function TestEdit() {
usePageTitle(`Usability Tests | ${uxtestingStore.instance ? 'Edit' : 'Create'}`);
React.useEffect(() => {
if (siteId !== uxtestingStore.instanceCreationSiteId) {
if (uxtestingStore.instanceCreationSiteId && siteId !== uxtestingStore.instanceCreationSiteId) {
history.push(withSiteId(usabilityTesting(), siteId));
}
}, [siteId]);

View file

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

View file

@ -737,13 +737,18 @@ export default class App {
}
}
if (uxtId && !this.uxtManager.isActive) {
// eslint-disable-next-line
this.uxtManager.getTest(uxtId, token, Boolean(savedUxtTag)).then((id) => {
if (id) {
this.onUxtCb.forEach((cb: (id: number) => void) => cb(id))
}
})
if (uxtId) {
if (!this.uxtManager.isActive) {
// eslint-disable-next-line
this.uxtManager.getTest(uxtId, token, Boolean(savedUxtTag)).then((id) => {
if (id) {
this.onUxtCb.forEach((cb: (id: number) => void) => cb(id))
}
})
} else {
// @ts-ignore
this.onUxtCb.forEach((cb: (id: number) => void) => cb(uxtId))
}
}
return SuccessfulStart(onStartInfo)