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

[BUG] DOMElement's reactRoot doesn't need to be removed from parentNode if parent already destroyed. #22

Open
trusktr opened this issue Sep 1, 2015 · 1 comment

Comments

@trusktr
Copy link

trusktr commented Sep 1, 2015

Here's a temporary fix:

DOMElement.prototype._famousReactRootDestroy = function _famousReactRootDestroy() {
    let reactRoot = this._famousReactRoot;
    if (reactRoot) {
        this._famousUnmountReact(reactRoot);
        if (reactRoot.parentNode)
            reactRoot.parentNode.removeChild(reactRoot);
        this._famousReactRoot = null;
    }
}

the difference is checking if (reactRoot.parentNode). Seems like it's null due to some prior cleanup steps.

@trusktr trusktr changed the title [BUG] reactRoot doesn't need to be removed from parentNode if parent already destroyed. [BUG] DOMElement's reactRoot doesn't need to be removed from parentNode if parent already destroyed. Sep 1, 2015
@trusktr
Copy link
Author

trusktr commented Sep 1, 2015

I'm doing lots of testing. I'll make some PRs soon. :]

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

1 participant