Skip to content

Commit eef7cc2

Browse files
committed
Merge pull request phaserjs#688 from jonthulu/cursorFix
Fixed bug in group.next when cursor is at the last child.
2 parents 14db957 + 0aca096 commit eef7cc2

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)
366+
if (this._cache[8] >= this.children.length - 1)
367367
{
368368
this._cache[8] = 0;
369369
}

0 commit comments

Comments
 (0)