Skip to content

Commit

Permalink
Default query to {}, same behaviour as next export (vercel#4466)
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens authored and lependu committed Jun 19, 2018
1 parent 2fb68be commit 4468e69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ export default class Server {
console.log('Defining routes from exportPathMap')
const exportPathMap = await this.nextConfig.exportPathMap({}) // In development we can't give a default path mapping
for (const path in exportPathMap) {
const options = exportPathMap[path]
const {page, query = {}} = exportPathMap[path]
routes[path] = async (req, res, params, parsedUrl) => {
await this.render(req, res, options.page, options.query, parsedUrl)
await this.render(req, res, page, query, parsedUrl)
}
}
}
Expand Down

0 comments on commit 4468e69

Please sign in to comment.