Skip to content

Commit

Permalink
fix: Cannot read property 'filter' of null
Browse files Browse the repository at this point in the history
  • Loading branch information
adesege committed Dec 31, 2019
1 parent 782a93d commit 8a43d86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function excludeRoutes(patterns, routes) {
patterns.forEach(pattern => {
const minimatch = new Minimatch(pattern)
minimatch.negate = true
routes = routes.filter(({ url }) => minimatch.match(url))
routes = (routes || []).filter(({ url }) => minimatch.match(url))
})
return routes
}
Expand Down

0 comments on commit 8a43d86

Please sign in to comment.