Closed kikoanis closed 8 years ago
Thanks @kikoanis. I can confirm that the bug exists and that the suggested fix works for 15.2.0. My stupid simple fix is only a few characters and only tested for my specific needs though.
@kikoanis thanks for the detailed report
Fix released in https://github.com/gcanti/tcomb-form/releases/tag/v0.9.8
Version
Tell us which versions you are using:
Expected behaviour
should run without issues
Actual behaviour
After upgrading to react 15.2.0, tcomb-form throws an error: Uncaught TypeError: Cannot read property '_idCounter' of undefined
Steps to reproduce
Stack trace and console log
I tracked down the error and it originates in this line:823 in components.js
this._reactInternalInstance._nativeContainerInfo._idCounter
it seems that_nativeContainerInfo
is no longer exists on the_reactInternalInstance
and it has changed in react 15.2.0 to be_hostContainerInfo
so the above line should readthis._reactInternalInstance._hostContainerInfo._idCounter
Now to fix it, I think you check for both (old and new) and select whatever available just to get react compatibility right.