Skip to content

Commit b9ec81a

Browse files
committed
Handle empty collections
1 parent 3d42644 commit b9ec81a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/prerender.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ function cleanURLPathForPage(sourceFile) {
152152

153153
function buildJSONFeedFile(pageProps) {
154154
const { siteURL, feedTitle, feedCollection } = packageJSON.tropical
155-
const items = pageProps.collections[feedCollection]
155+
const items = pageProps.collections[feedCollection] || []
156156

157157
// A minimal JSON Feed (see https://jsonfeed.org/version/1)
158158
const feed = {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tropical",
3-
"version": "7.0.0",
3+
"version": "7.0.1",
44
"scripts": {
55
"start": "concurrently \"node ./app/build.js development\" \"serve\" --kill-others --prefix-colors=yellow.dim,cyan.dim",
66
"build": "node ./app/build.js production",

0 commit comments

Comments
 (0)