Skip to content

Commit dd51a17

Browse files
committed
Ensure a parent container is a Group before removing from its hash.
1 parent 268b133 commit dd51a17

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
@@ -289,7 +289,7 @@ Phaser.Group.prototype.add = function (child, silent) {
289289

290290
if (child.parent !== this)
291291
{
292-
if (child.body && child.parent)
292+
if (child.body && child.parent && child.parent.hash)
293293
{
294294
child.parent.removeFromHash(child);
295295
}

0 commit comments

Comments
 (0)