refactor(all): strict boolean conditions

This commit is contained in:
Manu Mtz.-Almeida
2018-08-31 18:59:09 +02:00
parent f383ebdf13
commit ba2230510e
96 changed files with 990 additions and 962 deletions

View File

@ -29,7 +29,7 @@ export interface VirtualNode {
visible: boolean;
}
export type HeaderFn = (item: any, index: number, items: any[]) => string | null;
export type HeaderFn = (item: any, index: number, items: any[]) => string | null | undefined;
export type ItemHeightFn = (item: any, index: number) => number;
export type ItemRenderFn = (el: HTMLElement | null, cell: Cell, domIndex: number) => HTMLElement;
export type DomRenderFn = (dom: VirtualNode[]) => void;

View File

@ -209,7 +209,7 @@ export class VirtualScroll {
// unschedule future updates
if (this.timerUpdate) {
clearTimeout(this.timerUpdate);
this.timerUpdate = null;
this.timerUpdate = undefined;
}
// schedule DOM operations into the stencil queue
@ -280,6 +280,7 @@ export class VirtualScroll {
}
};
if (node && node.componentOnReady) {
// tslint:disable-next-line:no-floating-promises
node.componentOnReady().then(update);
} else {
update();