From 8ccfa7f53226453abe2c66e8298d0de9063cd7a9 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 30 Mar 2023 17:24:14 -0400 Subject: [PATCH] Update src/runtime/motion/spring.ts Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> --- src/runtime/motion/spring.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/motion/spring.ts b/src/runtime/motion/spring.ts index d85bc3ae30..ce93646dcc 100644 --- a/src/runtime/motion/spring.ts +++ b/src/runtime/motion/spring.ts @@ -115,7 +115,7 @@ export function spring(value?: T, opts: SpringOpts = {}): Spring { inv_mass = Math.min(inv_mass + inv_mass_recovery_rate, 1); last_time = Math.max(last_time, now - tick * limit); - while ( last_time < now ) { + while (last_time < now) { const elapsed = Math.min(tick, now - last_time); last_time += elapsed;