Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
Issue #SB-14580 fix : INTERACT event is generating after 0 search res…
Browse files Browse the repository at this point in the history
…ult.
  • Loading branch information
swayangjit committed Sep 3, 2019
1 parent f2ad2bd commit e791f6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/search/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ export class SearchPage implements OnInit, OnDestroy {
this.generateLogEvent(response);
const values = new Map();
values['from'] = this.source;
values['searchCount'] = this.searchContentResult.length;
values['searchCount'] = this.searchContentResult ? this.searchContentResult.length : 0;
values['searchCriteria'] = response.request;
this.telemetryGeneratorService.generateExtraInfoTelemetry(values, PageId.SEARCH);
} else {
Expand Down Expand Up @@ -1462,7 +1462,7 @@ export class SearchPage implements OnInit, OnDestroy {
const contentArray: Array<any> = searchResult.contentDataList;
const params = new Array<any>();
const paramsMap = new Map();
paramsMap['SearchResults'] = contentArray.length;
paramsMap['SearchResults'] = contentArray ? contentArray.length : 0;
paramsMap['SearchCriteria'] = searchResult.request;
params.push(paramsMap);
this.telemetryGeneratorService.generateLogEvent(LogLevel.INFO,
Expand Down

0 comments on commit e791f6e

Please sign in to comment.