-
Notifications
You must be signed in to change notification settings - Fork 855
fix bug with inferno #291
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
fix bug with inferno #291
Conversation
I think there was a typo there as well. |
@@ -328,10 +328,12 @@ export default class GoogleMap extends Component { | |||
const mapDom = ReactDOM.findDOMNode(this.refs.google_map_dom); | |||
window.removeEventListener('resize', this._onWindowResize); | |||
window.removeEventListener('keydown', this._onKeyDownCapture); | |||
mapDom.removeEventListener('mousedown', this._onMapMouseDownNative, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why findDOMNode returns null
on Inferno?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. Seems like a mistake with inferno. I reported it here: infernojs/inferno#590 . Not sure if/when it will be fixed.
window.removeEventListener('mouseup', this._onChildMouseUp, false); | ||
window.removeEventListener('touchmove', this._onTouchMove); | ||
detectElementResize.addResizeListener(mapDom, that._mapDomResizeCallback); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes looks like mistake
Ill merge today evening or tomorrow morning, its fun to see that libraries work with inferno preact etc, wanna to play with too |
window.removeEventListener('mouseup', this._onChildMouseUp, false); | ||
window.removeEventListener('touchmove', this._onTouchMove); | ||
detectElementResize.addResizeListener(mapDom, that._mapDomResizeCallback); | ||
if (mapDom) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could u add a comment that this check is for inferno support
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. |
Hey, I'm trying to migrate from React to InfernoJS. Everything works great, except somehow in
componentWillUnmount
the DOM is already gone (mapDom === null
) and this line throws an exception.