Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 TypeError: Cannot read property 'length' of undefined #18

Closed
hanna-greaves opened this issue Aug 11, 2020 · 3 comments 路 Fixed by #22
Closed

馃悰 TypeError: Cannot read property 'length' of undefined #18

hanna-greaves opened this issue Aug 11, 2020 · 3 comments 路 Fixed by #22
Labels

Comments

@hanna-greaves
Copy link
Contributor

Hi there!

I'm working on a Contentful project at the moment and was looking for a way to generate some simple types :) This project seems super helpful, but I had an issue getting started in that any call would result in
TypeError: Cannot read property 'length' of undefined

The error is coming from unguarded checks on the length of the validations property in a few places in code. It seems like either a) the contentful specification has been updated since this code was written and validations is no longer strictly required, or b) our content model is a bit off :)

Either way it seems like it would be nice to guard against this check for other users! I have a change ready if you are open to PRs

~Hanna

@marcolink
Copy link
Collaborator

Hi @hanna-greaves,

thanks for reporting this!
A PR from your side would be very welcome!

@hanna-greaves
Copy link
Contributor Author

Hey @marcolink, sorry for the delay! I've opened a PR for this now :)

@github-actions
Copy link

github-actions bot commented Sep 9, 2020

馃帀 This issue has been resolved in version 1.2.3 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants