various code quality fixes (#5792)

* various code quality fixes

* reduce duplicated code

* add safety check
This commit is contained in:
Denys Vuika
2020-06-18 17:57:46 +01:00
committed by GitHub
parent dc2060fe49
commit e9350bd297
54 changed files with 96 additions and 154 deletions

View File

@@ -285,7 +285,7 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
}
isPropertyChanged(property: SimpleChange): boolean {
return property && property.currentValue ? true : false;
return !!(property && property.currentValue);
}
convertToRowsData(rows: any []): ObjectDataRow[] {
@@ -375,7 +375,7 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
this.rowMenuCache = {};
}
isTableEmpty() {
isTableEmpty(): boolean {
return this.data === undefined || this.data === null;
}