-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
5.4 Cannot read property 'enumerable' of undefined #191
Comments
@timothyallan can you please provide a codesandbox example? |
Sure, it won't let me save it, but simply paste this into the index.js and it crashes.
|
Using arrow function seems to work, like your thoughts @mweststrate ? |
the arrow function "fixes" it as that makes the method a local (own) property, which is present indeed. I think a simple fix (strictly speaking not 100% correct) would be:
|
Please review this fix #198 |
This seems fixed now in 5.4.1. Thanks! |
Hey all, ViewModel is 5.4 is lighting up my console with waaaay too much red text!
My class objects which I'm using as ViewModels have the usual observable properties, but occasional functions as well.
It seems like this is the culprit
mobx-utils/src/create-view-model.ts
Line 59 in 5d147c1
In this loop,
mobx-utils/src/create-view-model.ts
Line 46 in 5d147c1
As soon as the
key
is the name of a function in my class object, I getUncaught TypeError: Cannot read property 'enumerable' of undefined
and everything explodes. 5.2 works great.
The text was updated successfully, but these errors were encountered: