-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Plugin throws TypeError if collection doesn't exist #25
Comments
Interesting. I guess that's possible. Do you use predefined collections? I would have guessed the collection would be |
My |
So, |
Sure, sounds good to me. |
Hey
First, thanks for the great plugin!
Second, just wondering why the plugin is so strict about requiring the collection to be present in the build. If I have a null collection (i.e. nothing in my build matches the pattern set on
metalsmith-collections
) then the plugin throws a TypeError (L37).I back most of my Metalsmith sites with Contentful, so I'm not in complete control of which items will be in the build. If an editor removes all items from a particular Content Type then it's possible that the collection will be empty.
Could default behaviour just be skipping over missing/empty collections?
Cheers
Sam
The text was updated successfully, but these errors were encountered: