File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,8 @@ export function flushUpdateQueue(
254254 */
255255export function flushUpdate (
256256 ctrl : Controller < any > ,
257- props : ControllerQueue [ number ]
257+ props : ControllerQueue [ number ] ,
258+ isLoop ?: boolean
258259) : Promise < boolean > {
259260 const { to, loop, onRest } = props
260261
@@ -329,11 +330,11 @@ export function flushUpdate(
329330
330331 return Promise . all ( promises ) . then ( results => {
331332 const finished = results . every ( result => result . finished )
332- if ( loop && finished && ! results . every ( result => result . noop ) ) {
333+ if ( loop && finished && ! ( isLoop && results . every ( result => result . noop ) ) ) {
333334 const nextProps = createLoopUpdate ( props , loop , to )
334335 if ( nextProps ) {
335336 prepareKeys ( ctrl , [ nextProps ] )
336- return flushUpdate ( ctrl , nextProps )
337+ return flushUpdate ( ctrl , nextProps , true )
337338 }
338339 }
339340 return finished
Original file line number Diff line number Diff line change @@ -496,7 +496,7 @@ export class SpringValue<T = any> extends FrameValue<T> {
496496 }
497497
498498 /** Schedule an animation to run after an optional delay */
499- protected _update ( props : SpringUpdate < T > ) : AsyncResult < T > {
499+ protected _update ( props : SpringUpdate < T > , isLoop ?: boolean ) : AsyncResult < T > {
500500 // Ensure the initial value can be accessed by animated components.
501501 const range = this . _prepareNode ( props )
502502
@@ -508,10 +508,10 @@ export class SpringValue<T = any> extends FrameValue<T> {
508508 this . _merge ( range , props , resolve )
509509 } ,
510510 } ) . then ( result => {
511- if ( props . loop && result . finished && ! result . noop ) {
511+ if ( props . loop && result . finished && ! ( isLoop && result . noop ) ) {
512512 const nextProps = createLoopUpdate ( props )
513513 if ( nextProps ) {
514- return this . _update ( nextProps )
514+ return this . _update ( nextProps , true )
515515 }
516516 }
517517 return result
You can’t perform that action at this time.
0 commit comments