Unverified Commit 8999ef26 authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

Remove Dead Code from Next Server (#10772)

* Remove Dead Code from Next Server

* remove options

* trigger
parent 302b55b4
......@@ -780,7 +780,7 @@ export default class Server {
return this.render404(req, res, parsedUrl)
}
const html = await this.renderToHTML(req, res, pathname, query, {})
const html = await this.renderToHTML(req, res, pathname, query)
// Request was ended by the user
if (html === null) {
return
......@@ -1127,14 +1127,7 @@ export default class Server {
req: IncomingMessage,
res: ServerResponse,
pathname: string,
query: ParsedUrlQuery = {},
{
amphtml,
hasAmp,
}: {
amphtml?: boolean
hasAmp?: boolean
} = {}
query: ParsedUrlQuery = {}
): Promise<string | null> {
try {
const result = await this.findPageComponents(pathname, query)
......@@ -1144,7 +1137,7 @@ export default class Server {
res,
pathname,
result,
{ ...this.renderOpts, amphtml, hasAmp }
{ ...this.renderOpts }
)
if (result2 !== false) {
return result2
......@@ -1169,12 +1162,7 @@ export default class Server {
res,
dynamicRoute.page,
result,
{
...this.renderOpts,
params,
amphtml,
hasAmp,
}
{ ...this.renderOpts, params }
)
if (result2 !== false) {
return result2
......
......@@ -448,8 +448,7 @@ export default class DevServer extends Server {
req: IncomingMessage,
res: ServerResponse,
pathname: string,
query: { [key: string]: string },
options = {}
query: { [key: string]: string }
) {
const compilationErr = await this.getCompilationError(pathname)
if (compilationErr) {
......@@ -489,7 +488,7 @@ export default class DevServer extends Server {
}
if (!this.quiet) console.error(err)
}
const html = await super.renderToHTML(req, res, pathname, query, options)
const html = await super.renderToHTML(req, res, pathname, query)
return html
}
......
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