mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Default query to {}, same behaviour as next export (#4466)
This commit is contained in:
parent
2c3e8d3201
commit
e9242705a3
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue