From ea35d72e69923ffb3ad1b278eec801701e5b2e80 Mon Sep 17 00:00:00 2001 From: Fadojutimi Temitayo Olusegun Date: Wed, 1 Jul 2020 18:43:07 +0100 Subject: [PATCH] fix: Cannot read property 'filter' of null on Zeit --- lib/module.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/module.js b/lib/module.js index 8605814..2b664d0 100644 --- a/lib/module.js +++ b/lib/module.js @@ -23,7 +23,7 @@ module.exports = async function module(moduleOptions) { ? path.resolve(nuxtInstance.options.buildDir, path.join('dist', 'sitemap-routes.json')) : null const staticRoutes = fs.readJsonSync(jsonStaticRoutesPath, { throws: false }) - const globalCache = { staticRoutes } + const globalCache = { staticRoutes: staticRoutes || [] } // Init static routes nuxtInstance.extendRoutes((routes) => {