Skip to content

Commit ea35d72

Browse files
committed
fix: Cannot read property 'filter' of null on Zeit
1 parent 1a1b277 commit ea35d72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = async function module(moduleOptions) {
2323
? path.resolve(nuxtInstance.options.buildDir, path.join('dist', 'sitemap-routes.json'))
2424
: null
2525
const staticRoutes = fs.readJsonSync(jsonStaticRoutesPath, { throws: false })
26-
const globalCache = { staticRoutes }
26+
const globalCache = { staticRoutes: staticRoutes || [] }
2727

2828
// Init static routes
2929
nuxtInstance.extendRoutes((routes) => {

0 commit comments

Comments
 (0)