Skip to content

Commit 7d26eb4

Browse files
committed
Remove analytics event that never fires
`updateValue` will always be undefined because the return type of the `update` method is void. As such, the if statement will never be true and analytics event never recorded. I also haven't the slightest clue why this event was added to SubSampleModel in the first place, implying it was only meant to record succesful updates to subsamples, but then the name nor the metadata of the event suggests this...?
1 parent 94282b8 commit 7d26eb4

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/main/webapp/ui/src/stores/models/SubSampleModel.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -344,20 +344,14 @@ export default class SubSampleModel
344344
const id = this.id;
345345
this.setLoading(true);
346346

347-
const [{ status: updateStatus, value: updateValue }, ...noteResults] =
347+
const [{}, ...noteResults] =
348348
await Promise.allSettled([
349349
super.update(refresh),
350350
...this.notes
351351
.filter((n) => !n.id)
352352
.map((n) => ApiService.post<void, void>(`subSamples/${id}/notes`, n)),
353353
]);
354354

355-
if (updateStatus === "fulfilled" && updateValue) {
356-
getRootStore().trackingStore.trackEvent("InventoryRecordEdited", {
357-
type: this.recordType,
358-
});
359-
}
360-
361355
if (noteResults.some(({ status }) => status === "rejected")) {
362356
getRootStore().uiStore.addAlert(
363357
mkAlert({

0 commit comments

Comments
 (0)