Skip to content

Commit cb6a9de

Browse files
committed
fix(tracker): some fixes for uxt
1 parent 4fb7fd0 commit cb6a9de

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

frontend/app/components/UsabilityTesting/TestEdit.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function TestEdit() {
5151
usePageTitle(`Usability Tests | ${uxtestingStore.instance ? 'Edit' : 'Create'}`);
5252

5353
React.useEffect(() => {
54-
if (siteId !== uxtestingStore.instanceCreationSiteId) {
54+
if (uxtestingStore.instanceCreationSiteId && siteId !== uxtestingStore.instanceCreationSiteId) {
5555
history.push(withSiteId(usabilityTesting(), siteId));
5656
}
5757
}, [siteId]);

tracker/tracker/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@openreplay/tracker",
33
"description": "The OpenReplay tracker main package",
4-
"version": "11.0.2-13",
4+
"version": "11.0.2-15",
55
"keywords": [
66
"logging",
77
"replay"

tracker/tracker/src/main/app/index.ts

+12-7
Original file line numberDiff line numberDiff line change
@@ -737,13 +737,18 @@ export default class App {
737737
}
738738
}
739739

740-
if (uxtId && !this.uxtManager.isActive) {
741-
// eslint-disable-next-line
742-
this.uxtManager.getTest(uxtId, token, Boolean(savedUxtTag)).then((id) => {
743-
if (id) {
744-
this.onUxtCb.forEach((cb: (id: number) => void) => cb(id))
745-
}
746-
})
740+
if (uxtId) {
741+
if (!this.uxtManager.isActive) {
742+
// eslint-disable-next-line
743+
this.uxtManager.getTest(uxtId, token, Boolean(savedUxtTag)).then((id) => {
744+
if (id) {
745+
this.onUxtCb.forEach((cb: (id: number) => void) => cb(id))
746+
}
747+
})
748+
} else {
749+
// @ts-ignore
750+
this.onUxtCb.forEach((cb: (id: number) => void) => cb(uxtId))
751+
}
747752
}
748753

749754
return SuccessfulStart(onStartInfo)

0 commit comments

Comments
 (0)