diff --git a/lib/routes.js b/lib/routes.js index 79c3fe8..459777a 100644 --- a/lib/routes.js +++ b/lib/routes.js @@ -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 }