110889: Fixed trackStatistics still sending backend requests to track search event when trackStatistics is false

This commit is contained in:
Alexandre Vryghem
2024-02-18 18:49:55 +01:00
parent 37c534b809
commit 7968f68976

View File

@@ -485,7 +485,8 @@ export class SearchComponent implements OnDestroy, OnInit {
* This method should only be called once and is essentially what SearchTrackingComponent used to do (now removed)
* @private
*/
private subscribeToRoutingEvents() {
private subscribeToRoutingEvents(): void {
if (this.trackStatistics) {
this.subs.push(
this.router.events.pipe(
filter((event) => event instanceof NavigationStart),
@@ -498,6 +499,7 @@ export class SearchComponent implements OnDestroy, OnInit {
}),
);
}
}
/**
* Get the UUID from a DSO url