Skip to content

Commit

Permalink
fix(transition): handle possible auto value for transition/animation …
Browse files Browse the repository at this point in the history
…durations

close #8409
  • Loading branch information
yyx990803 committed Jun 14, 2023
1 parent 1f83020 commit 96c76fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/runtime-dom/src/components/Transition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,8 @@ function getTimeout(delays: string[], durations: string[]): number {
// If comma is not replaced with a dot, the input will be rounded down
// (i.e. acting as a floor function) causing unexpected behaviors
function toMs(s: string): number {
// #8409 default value for CSS durations can be 'auto'
if (s === 'auto') return 0
return Number(s.slice(0, -1).replace(',', '.')) * 1000
}

Expand Down

0 comments on commit 96c76fa

Please sign in to comment.