Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UpdateList.prototype.remove issue #4365

Closed
jcyuan opened this issue Feb 14, 2019 · 2 comments
Closed

UpdateList.prototype.remove issue #4365

jcyuan opened this issue Feb 14, 2019 · 2 comments

Comments

@jcyuan
Copy link
Contributor

jcyuan commented Feb 14, 2019

remove: function (child)
{
var index = this._list.indexOf(child);

    if (index !== -1)
    {
        this._list.splice(index, 1);
    }

    return child;
},

I think should push the child into _pendingRemoval list but not directly remove from the active list? otherwise _pendingRemoval becomes useless?

and if use _pendingRemoval I think the indexOf check is unnecessary here because later it will be checked in the preUpdate method.

you think? or is this designed originally like so?

@photonstorm
Copy link
Collaborator

It should go in the pendingRemoval array.

@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants