# Timeline looping breaking in minified v.3.21

**URL:** <https://phaser.discourse.group/t/timeline-looping-breaking-in-minified-v-3-21/4595>\
**Category:** Phaser 3\
**Created:** [December 13, 2019, 11:43pm UTC](https://phaser.discourse.group/t/timeline-looping-breaking-in-minified-v-3-21/4595 "2019-12-13T23:43:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cincospenguinos](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/cincospenguinos/32/197_2.png) [@cincospenguinos](https://phaser.discourse.group/u/cincospenguinos)\
**Post date:** [December 13, 2019, 11:43pm UTC](https://phaser.discourse.group/t/timeline-looping-breaking-in-minified-v-3-21/4595/1 "2019-12-13T23:43:46Z")

</div>

I believe I found a bug and I’d be more than happy to report it and contribute to its fix, but I wanted to make sure I wasn’t just going crazy or that it’s not known first.

I have a class called `Enemy` that extends another called `Entity` that extends `Phaser.GameObject.Sprite`. I am adding a timeline in `Enemy` that houses a finite but arbitrarily sized number of tween objects that follow a specific pattern. Here’s how I am using it:

```javascript
const timeline = this.scene.tweens.timeline({
	loop: -1,
	duration: 3000,
	tweens: [{
		targets: { val: 0 },
		val: 1,
		yoyo: false,
		ease: "Linear",
		callbackScope: this,
		onStart: () => { this.setX(initialPosition.x); this.setY(initialPosition.y); },
		onUpdate: this.move,
	}],
});

```

This code works perfectly as intended when I use `phaser.js`, the full development version built by webpack and downloaded from the site. It does an odd thing similar to [this issue from earlier this year](https://github.com/photonstorm/phaser/issues/4558), where the infinite loop is not being respected and the second time my tween occurs it’s going twice as fast. Am I just missing something or did I come across a bug?

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [December 14, 2019, 12:09am UTC](https://phaser.discourse.group/t/timeline-looping-breaking-in-minified-v-3-21/4595/2 "2019-12-14T00:09:49Z")

</div>

Which Phaser version shows in the browser console?

---

<div class="post-metadata">

**Author:** ![cincospenguinos](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/cincospenguinos/32/197_2.png) [@cincospenguinos](https://phaser.discourse.group/u/cincospenguinos)\
**Post date:** [December 14, 2019, 12:21am UTC](https://phaser.discourse.group/t/timeline-looping-breaking-in-minified-v-3-21/4595/3 "2019-12-14T00:21:25Z")

</div>

Oh dang:

` Phaser v3.17.0 (WebGL | Web Audio) https://phaser.io`

There’s my answer. I’m glad I posted here sooner! Thank you, @samme!
