111638: Use hasValue instead of nullCheck

This commit is contained in:
Andreas Awouters
2024-02-05 16:18:14 +01:00
parent 72c04cfc77
commit 4af303d0f2

View File

@@ -10,6 +10,7 @@ import { ProcessStatus } from '../processes/process-status.model';
import { DatePipe } from '@angular/common'; import { DatePipe } from '@angular/common';
import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model'; import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model';
import { SortOptions, SortDirection } from '../../core/cache/models/sort-options.model'; import { SortOptions, SortDirection } from '../../core/cache/models/sort-options.model';
import { hasValue } from '../../shared/empty.util';
/** /**
* The sortable fields for processes * The sortable fields for processes
@@ -60,7 +61,7 @@ export class ProcessOverviewService {
elementsPerPage: 5, elementsPerPage: 5,
}, findListOptions); }, findListOptions);
if (autoRefreshingIntervalInMs !== null && autoRefreshingIntervalInMs > 0) { if (hasValue(autoRefreshingIntervalInMs) && autoRefreshingIntervalInMs > 0) {
return this.processDataService.autoRefreshingSearchBy('byProperty', options, autoRefreshingIntervalInMs); return this.processDataService.autoRefreshingSearchBy('byProperty', options, autoRefreshingIntervalInMs);
} else { } else {
return this.processDataService.searchBy('byProperty', options); return this.processDataService.searchBy('byProperty', options);