Skip to content

Commit b569f92

Browse files
committed
Merge pull request phaserjs#729 from garyyeap/fix-timer-event
Fixed that the TimerEvent should flag as pendingDelete before calling the callback, because callback might trigger the reorder function
2 parents 18c524c + 1cf9ff9 commit b569f92

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/time/Timer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,8 @@ Phaser.Timer.prototype = {
408408
}
409409
else
410410
{
411-
this.events[this._i].callback.apply(this.events[this._i].callbackContext, this.events[this._i].args);
412411
this.events[this._i].pendingDelete = true;
412+
this.events[this._i].callback.apply(this.events[this._i].callbackContext, this.events[this._i].args);
413413
}
414414

415415
this._i++;

0 commit comments

Comments
 (0)