Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Check for categories #14

wants to merge 1 commit into


None yet
2 participants

TooTallNate commented Nov 2, 2010

The new categories seem awesome!

I found a glitch while testing them out: when an article has no categories, the chaos!

@TooTallNate TooTallNate Check for the existence of the 'categories' array, instead of assumin…
…g it's there.

This correct Wheat from throwing exceptions when an article was written with no categories.

acmarques commented Nov 2, 2010

Ooops, I think I left this comment in the wrong place! :)

I noticed this issue yesterday, but I did a slightly different solution:


When reading the article, if there are no categories declared, I simply return an empty array. The problem is that I was returning undefined.

This way it is not necessary to change code in other places than in the article function.

What do you think guys?

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment