Skip to content

Commit 67418f7

Browse files
committed
fix: stop handling the pause prop in SpringValue#_merge
The `runAsync` function already handles it for us
1 parent f732b86 commit 67418f7

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

packages/core/src/SpringValue.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -794,34 +794,22 @@ export class SpringValue<T = any> extends FrameValue<T> {
794794
node.setValue(value)
795795
}
796796

797-
const paused = props.pause
798-
if (paused) {
799-
this.pause()
800-
}
801-
802797
if (hasAsyncTo) {
803798
resolve(runAsync(props.to, props, this._state, this))
804799
}
805800

806801
// Start an animation
807802
else if (started) {
808-
if (!paused) {
809-
// Unpause the async animation if one exists.
810-
this.resume()
811-
}
803+
// Unpause the async animation if one exists.
804+
this.resume()
812805

813806
if (reset) {
814807
// Must be idle for "onStart" to be called again.
815808
this._phase = IDLE
816809
}
817810

818811
this._reset()
819-
820-
if (paused) {
821-
this._phase = PAUSED
822-
} else {
823-
this._start()
824-
}
812+
this._start()
825813
}
826814

827815
// Postpone promise resolution until the animation is finished,

0 commit comments

Comments
 (0)