Skip to content

Commit 8eba6d6

Browse files
committed
fix: avoid overriding "to" value with "from" prop
..but only for updates with a falsy "default" prop.
1 parent 7daff69 commit 8eba6d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/SpringValue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ export class SpringValue<T = any> extends FrameValue<T> {
616616
let { to = prevTo, from = prevFrom } = range
617617

618618
// Focus the "from" value if changing without a "to" value.
619-
if (hasFromProp && !hasToProp) {
619+
if (hasFromProp && !hasToProp && (!props.default || is.und(to))) {
620620
to = from
621621
}
622622

0 commit comments

Comments
 (0)