from: isNaN()

in dashboards-notifications/public/pages/Notifications/utils/helpers.ts [48:82]


    from: isNaN(parseInt(from, 10))
      ? DEFAULT_QUERY_PARAMS.from
      : parseInt(from as string, 10),
    // @ts-ignore
    size: isNaN(parseInt(size, 10))
      ? DEFAULT_QUERY_PARAMS.size
      : parseInt(size as string, 10),
    search: typeof search !== 'string' ? DEFAULT_QUERY_PARAMS.search : search,
    sortField:
      typeof sortField !== 'string'
        ? DEFAULT_QUERY_PARAMS.sortField
        : sortField,
    sortDirection:
      typeof sortDirection !== 'string'
        ? DEFAULT_QUERY_PARAMS.sortDirection
        : sortDirection,
    startTime:
      typeof startTime !== 'string' || startTime.length === 0
        ? DEFAULT_QUERY_PARAMS.startTime
        : startTime,
    endTime:
      typeof endTime !== 'string' || endTime.length === 0
        ? DEFAULT_QUERY_PARAMS.endTime
        : endTime,
    filters: parsedFilters,
    histogramType:
      typeof histogramType !== 'string'
        ? DEFAULT_QUERY_PARAMS.histogramType
        : histogramType,
  };
};

export const getReferenceURL = (item: NotificationItem) => {
  const id = item.event_source.reference_id;
  switch (item.event_source.feature) {