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