Skip to content

Commit 0aca096

Browse files
author
Jon White
committed
Fixed bug when group.remove is called when the cursor is on the last children index.
1 parent ab3ae75 commit 0aca096

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/core/Group.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ Phaser.Group.prototype.next = function () {
363363
if (this.cursor)
364364
{
365365
// Wrap the cursor?
366-
if (this._cache[8] === this.children.length - 1)
366+
if (this._cache[8] >= this.children.length - 1)
367367
{
368368
this._cache[8] = 0;
369369
}

0 commit comments

Comments
 (0)