Skip to content

Commit 8a43d86

Browse files
committed
fix: Cannot read property 'filter' of null
1 parent 782a93d commit 8a43d86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function excludeRoutes(patterns, routes) {
1111
patterns.forEach(pattern => {
1212
const minimatch = new Minimatch(pattern)
1313
minimatch.negate = true
14-
routes = routes.filter(({ url }) => minimatch.match(url))
14+
routes = (routes || []).filter(({ url }) => minimatch.match(url))
1515
})
1616
return routes
1717
}

0 commit comments

Comments
 (0)