Unverified Commit e9242705 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Default query to {}, same behaviour as next export (#4466)

parent 2c3e8d32
...@@ -264,9 +264,9 @@ export default class Server { ...@@ -264,9 +264,9 @@ export default class Server {
console.log('Defining routes from exportPathMap') console.log('Defining routes from exportPathMap')
const exportPathMap = await this.nextConfig.exportPathMap({}) // In development we can't give a default path mapping const exportPathMap = await this.nextConfig.exportPathMap({}) // In development we can't give a default path mapping
for (const path in exportPathMap) { for (const path in exportPathMap) {
const options = exportPathMap[path] const {page, query = {}} = exportPathMap[path]
routes[path] = async (req, res, params, parsedUrl) => { 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)
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment