Skip to content

Commit

Permalink
fix: avoid overriding "to" value with "from" prop
Browse files Browse the repository at this point in the history
..but only for updates with a falsy "default" prop.
  • Loading branch information
aleclarson committed Jun 5, 2020
1 parent 7daff69 commit 8eba6d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/SpringValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ export class SpringValue<T = any> extends FrameValue<T> {
let { to = prevTo, from = prevFrom } = range

// Focus the "from" value if changing without a "to" value.
if (hasFromProp && !hasToProp) {
if (hasFromProp && !hasToProp && (!props.default || is.und(to))) {
to = from
}

Expand Down

0 comments on commit 8eba6d6

Please sign in to comment.