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
15.8.0: checkPropTypes
sometimes throws: Cannot read properties of undefined (reading 'hasOwnProperty')
#369
Comments
aha - I do see one incorrect usage of |
Any chance you could provide the propType code you're using that generates that, so I can write a test case? |
From what I can tell, our unit test code is passing |
Thanks! I'll see if i can repro it. |
hmm, that doesn't seem to do it. Can you perhaps provide the exact code you're using? |
Unfortunately this particular unit test code is kind of convoluted (and proprietary), so extracting a workable example isn't that easy. We're passing a multi-level object to |
I was able to reproduce it with a custom propType, but it'd be ideal to use non-contrived code if you can provide it :-) |
It really won't be easy for me to provide it (and would require an investment of time I don't have), so I would suggest using your custom prop-type in the interest of getting out a quick fix. |
Filed #370; that should do it. I'll have it released shortly. |
v15.8.1 is released. |
Thanks for the quick fix! I just tried it out and my unit tests are passing again. 🎉 |
I tried upgrading from 15.7.2 to 15.8.0 in my project and now I'm getting this error on some of our unit tests:
I've double-checked that I'm not passing undefined or null to
checkPropTypes
; all the data is valid and intact. This seems like an error insidecheckPropTypes
itself.The text was updated successfully, but these errors were encountered: