Skip to content

Commit

Permalink
chore: use generate:page hook
Browse files Browse the repository at this point in the history
close #180
  • Loading branch information
farnabaz committed Oct 4, 2020
1 parent aed2938 commit fca767b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ function processRoutes (options) {
}
})
/**
* Register to hook `export:page`, AMP routes that returns 404 statusCode must be excluded
* Register to hook `generate:page`, AMP routes that returns 404 statusCode must be excluded
* from static generation
*/
this.nuxt.hook('export:page', ({ page, errors }) => {
this.nuxt.hook('generate:page', ({ page, errors }) => {
if (errors.length) {
const error = errors.find(error => error.route.includes('/amp'))
if (error && error.error.statusCode === 404) {
Expand Down

0 comments on commit fca767b

Please # to comment.