Skip to content

added if statement in onRemove() function - #555

Merged
itsmichaeldiego merged 1 commit into
GoogleMapReact:masterfrom
atkallie:master
Apr 17, 2018
Merged

itsmichaeldiego merged 1 commit into
GoogleMapReact:masterfrom
atkallie:master

Conversation

@atkallie

@atkallie atkallie commented Apr 7, 2018

Copy link
Copy Markdown
Contributor

Added an if statement in onRemove() function that checks if this.div is defined before calling ReactDOM.unmountComponentAtNode(this.div). This is done to avoid throwing an unmountComponentAtNode(...): Target container is not a DOM element error. I ran into this error while using google-map-react with React Router and switching between tabs rapidly to stress test my application.

Added an if statement in onRemove() function that checks if "this.div" is defined before calling ReactDOM.unmountComponentAtNode(this.div). This is done to avoid throwing an "unmountComponentAtNode(...): Target container is not a DOM element" error. I ran into this error while using google-map-react with React Router and switching between tabs rapidly to stress test my application.
@itsmichaeldiego

Copy link
Copy Markdown
Member

@atkallie Thanks, defensive programming is always a plus.

@itsmichaeldiego
itsmichaeldiego merged commit 147997c into GoogleMapReact:master Apr 17, 2018
@lock

lock Bot commented Dec 1, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Dec 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants