Skip to content

Commit

Permalink
fix(module): handle undefined routes
Browse files Browse the repository at this point in the history
close #166
  • Loading branch information
farnabaz committed Sep 3, 2020
1 parent 1210e5d commit bceda93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bceda93

Please # to comment.