Skip to content

Commit ab3ae75

Browse files
author
Jon White
committed
Fixed bug in group.next when cursor is at the last child.
1 parent 5b73bb2 commit ab3ae75

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)