javascript - null dereference in React 15.1 on image load -
i'm running strange error after updating react 15.1 react 0.14:
reactdomcomponenttree.js:105 uncaught typeerror: cannot read property '__reactinternalinstance$wzdyscjjtuxtcehaa6ep6tj4i' of null
it appears "load" event image buried in page using data url causing event , react walks dom , when hits top element react injected has no parentelement , tries access member on "null" parentelement
simplified application (abridged):
class app extends react.component { render() { return <div id="rootcomponent"> ... </div>; } } reactdom.render(<app/>, document.getelementbyid('app'));
resulting html:
<div id="app"> <div id="rootcomponent"> ... </div> </div>
the element id "rootelement" has null parentelement causes error. page otherwise seems work perplexing me.
stacktrace:
getclosestinstancefromnode (reactdomcomponenttree.js:105) findparent (reacteventlistener.js:39) handletoplevelimpl (reacteventlistener.js:68) mixin.perform (transaction.js:136) reactdefaultbatchingstrategy.batchedupdates (reactdefaultbat…strategy.js:63) batchedupdates (reactupdates.js:98) reacteventlistener.dispatchevent (reacteventlistener.js:150)
thoughts on correcting this? maybe react bug?
i'm derp.
i noticed javascript getting loaded twice. had updated htmlwebpackplugin across major version , changed behaviour involving injecting javascript. in template , plugin injecting it.
after removing line template javascript loaded once, fine.
that's updating libraries @ 5pm.