From bceda93f1791ffb13b08bea3bf3de350f804863f Mon Sep 17 00:00:00 2001 From: Farnabaz Date: Thu, 3 Sep 2020 16:02:45 +0430 Subject: [PATCH] fix(module): handle undefined routes close #166 --- lib/module.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/module.js b/lib/module.js index d6ebbeb5..8f18c56e 100644 --- a/lib/module.js +++ b/lib/module.js @@ -38,7 +38,7 @@ module.exports = function (moduleOptions) { function processRoutes (options) { this.nuxt.hook('generate:extendRoutes', (routes) => { for (const route of routes) { - if (route.route !== '/amp' && route.route.indexOf('/amp/') !== 0) { + if (route.route && route.route !== '/amp' && route.route.indexOf('/amp/') !== 0) { routes.push({ ...route, route: '/amp' + route.route