Skip to content

Commit

Permalink
fix(tracker): some fixes for uxt
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-delirium committed Dec 11, 2023
1 parent 4fb7fd0 commit cb6a9de
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion frontend/app/components/UsabilityTesting/TestEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion tracker/tracker/package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
19 changes: 12 additions & 7 deletions tracker/tracker/src/main/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cb6a9de

Please sign in to comment.