diff --git a/packages/runtime-dom/src/components/CSSTransition.ts b/packages/runtime-dom/src/components/CSSTransition.ts index e7a24e88..09862ec4 100644 --- a/packages/runtime-dom/src/components/CSSTransition.ts +++ b/packages/runtime-dom/src/components/CSSTransition.ts @@ -210,26 +210,14 @@ function getTransitionInfo( ): CSSTransitionInfo { const styles: any = window.getComputedStyle(el) // JSDOM may return undefined for transition properties - const transitionDelays: Array = ( - styles[TRANSITION + 'Delay'] || '' - ).split(', ') - const transitionDurations: Array = ( - styles[TRANSITION + 'Duration'] || '' - ).split(', ') - const transitionTimeout: number = getTimeout( - transitionDelays, - transitionDurations - ) - const animationDelays: Array = ( - styles[ANIMATION + 'Delay'] || '' - ).split(', ') - const animationDurations: Array = ( - styles[ANIMATION + 'Duration'] || '' - ).split(', ') - const animationTimeout: number = getTimeout( - animationDelays, - animationDurations + const transitionDelays = (styles[TRANSITION + 'Delay'] || '').split(', ') + const transitionDurations = (styles[TRANSITION + 'Duration'] || '').split( + ', ' ) + const transitionTimeout = getTimeout(transitionDelays, transitionDurations) + const animationDelays = (styles[ANIMATION + 'Delay'] || '').split(', ') + const animationDurations = (styles[ANIMATION + 'Duration'] || '').split(', ') + const animationTimeout = getTimeout(animationDelays, animationDurations) let type: CSSTransitionInfo['type'] = null let timeout = 0