Skip to content

Commit e53a0a1

Browse files
authored
Merge pull request phaserjs#4087 from TadejZupancic/patch-1
Tween inside Timeline fix
2 parents 56babb5 + 5a93c7b commit e53a0a1

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/tweens/tween/Tween.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -944,8 +944,16 @@ var Tween = new Class({
944944
{
945945
if (this.state === TWEEN_CONST.PAUSED || this.state === TWEEN_CONST.PENDING_ADD)
946946
{
947-
this.parent._destroy.push(this);
948-
this.parent._toProcess++;
947+
if (this.parentIsTimeline)
948+
{
949+
this.parent.manager._destroy.push(this);
950+
this.parent.manager._toProcess++;
951+
}
952+
else
953+
{
954+
this.parent._destroy.push(this);
955+
this.parent._toProcess++;
956+
}
949957
}
950958

951959
this.state = TWEEN_CONST.PENDING_REMOVE;

0 commit comments

Comments
 (0)