Skip to content

Commit 304ec5b

Browse files
committed
fix: cancel the current runAsync call when Controller#stop is called with no arguments
1 parent 941cd70 commit 304ec5b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/core/src/Controller.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ export class Controller<State extends Lookup = Lookup>
136136
stop(keys?: OneOrMore<string>) {
137137
if (is.und(keys)) {
138138
this.each(spring => spring.stop())
139+
cancelAsync(this._state, this._lastAsyncId)
139140
} else {
140141
const springs = this.springs as Lookup<SpringValue>
141142
each(toArray(keys), key => springs[key].stop())

0 commit comments

Comments
 (0)