Skip to content

Commit 685c3ff

Browse files
committed
fix: only start the frameloop when at least one animation is not idle
This prevents "onRest" from being called when a Controller update only creates idle animations.
1 parent b5fd50b commit 685c3ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/Controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ export class Controller<State extends Indexable = any> {
266266
// Add this controller to the frameloop.
267267
private _start(onEnd?: OnEnd) {
268268
if (onEnd) this._onEnd(onEnd)
269-
if (this.idle && this.runCount) {
269+
if (this.idle && this.configs.some(config => !config.idle)) {
270270
this.idle = false
271271
G.frameLoop.start(this)
272272
}

0 commit comments

Comments
 (0)