Closed facultymatt closed 9 years ago
It's good to add this check, but I'm wondering why a rule would be undefined. Can you post here your schema definition that's causing the error. Or better yet, and plunker that demonstrates the issue? Here's one you can work from: http://plnkr.co/edit/LV6c0Y?p=info
http://plnkr.co/edit/i8G2JF?p=preview
See console for TypeError: Cannot read property 'async' of undefined
I'm investigating, I think there's a deeper bug here.
Yes, it turns out there was a deeper issue, requiring a different fix. I still think it's good to add these checks, so I'll merge your PR and then make the other fix.
Awesome! Thanks for the quick fixes!
@facultymatt It's actually fixed in 1.2.3. 1.2.2 was missing one tiny piece.
This PR fixes an issue that happens when using nested schema.
We check that rule exists AND is not async.
I was not sure how to test this, so no tests are included. I only encountered this issue when using schema with js-data and js-data angular.