refactor(v2): do not generate RSS files for empty feed (#4905)

This commit is contained in:
Alexey Pyltsyn 2021-06-09 14:26:53 +03:00 committed by GitHub
parent 526ce44933
commit f71e83450f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 29 deletions

View file

@ -67,7 +67,7 @@ export async function generateBlogFeed(
}
const {siteConfig} = context;
const blogPosts = await generateBlogPosts(contentPaths, context, options);
if (blogPosts == null) {
if (!blogPosts.length) {
return null;
}