mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
refactor(all): strict boolean conditions
This commit is contained in:
@ -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;
|
||||
|
@ -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();
|
||||
|
Reference in New Issue
Block a user