Skip to content

Commit 396140f

Browse files
committed
Better error messaging for #61
1 parent 2851612 commit 396140f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/virtualTemplate.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ function eleventyFeedPlugin(eleventyConfig, options = {}) {
134134
if(!options.collection?.name) {
135135
throw new Error("Missing `collection.name` option in feedPlugin from @11ty/eleventy-plugin-rss.");
136136
}
137+
if(typeof options.collection?.name !== "string") {
138+
throw new Error("Only string is supported in `collection.name` option in feedPlugin from @11ty/eleventy-plugin-rss. Received: " + typeof options.collection?.name);
139+
}
137140

138141
let eleventyExcludeFromCollections;
139142
let eleventyImport;

0 commit comments

Comments
 (0)