diff --git a/core/src/utils/helpers.ts b/core/src/utils/helpers.ts index ee5d8bcd10..92d43fc7a6 100644 --- a/core/src/utils/helpers.ts +++ b/core/src/utils/helpers.ts @@ -22,7 +22,7 @@ export const transitionEndAsync = (el: HTMLElement | null, expectedDuration = 0) */ const transitionEnd = (el: HTMLElement | null, expectedDuration = 0, callback: (ev?: TransitionEvent) => void) => { let unRegTrans: (() => void) | undefined; - let animationTimeout: any; + let animationTimeout: number | undefined; const opts: any = { passive: true }; const ANIMATION_FALLBACK_TIMEOUT = 500; @@ -45,7 +45,7 @@ const transitionEnd = (el: HTMLElement | null, expectedDuration = 0, callback: ( animationTimeout = setTimeout(onTransitionEnd, expectedDuration + ANIMATION_FALLBACK_TIMEOUT); unRegTrans = () => { - if (animationTimeout) { + if (animationTimeout !== undefined) { clearTimeout(animationTimeout); animationTimeout = undefined; }