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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'src' of undefined #21

Open
chrislim opened this issue Sep 5, 2014 · 0 comments
Open

Cannot read property 'src' of undefined #21

chrislim opened this issue Sep 5, 2014 · 0 comments

Comments

@chrislim
Copy link

chrislim commented Sep 5, 2014

I noticed that the bug I was encountering in this issue assemble/assemble#547 may have been caused by this line/the following line:
https://github.com/helpers/handlebars-helper-compose/blob/master/index.js#L52
ctx.page is undefined so an error is thrown when we try to reference src from it.

I added a try catch block around it and suppressed the error and it seems like the build succeeds and the site runs. However, I didn't get a chance to examine the wider to context to see why ctx.page is undefined when passed in the first place and also why the error doesn't show up until I have more than 10 pages to render (.hbs files). The catch block seemed to be hit even when I had less than 10 pages, but grunt would not throw the error

Warning: Cannot read property 'src' of undefined

Unless I had more than 10.

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

No branches or pull requests

1 participant