@@ -205,7 +205,7 @@ export default class Server {
205205 return sendHTML ( req , res , html , { generateEtags} )
206206 }
207207
208- public async render ( req : IncomingMessage , res : ServerResponse , pathname : string , query : ParsedUrlQuery , parsedUrl : UrlWithParsedQuery ) : Promise < void > {
208+ public async render ( req : IncomingMessage , res : ServerResponse , pathname : string , query : ParsedUrlQuery = { } , parsedUrl ? : UrlWithParsedQuery ) : Promise < void > {
209209 const url : any = req . url
210210 if ( isInternalUrl ( url ) ) {
211211 return this . handleRequest ( req , res , parsedUrl )
@@ -227,7 +227,7 @@ export default class Server {
227227 return this . sendHTML ( req , res , html )
228228 }
229229
230- public async renderToHTML ( req : IncomingMessage , res : ServerResponse , pathname : string , query : ParsedUrlQuery ) : Promise < string | null > {
230+ public async renderToHTML ( req : IncomingMessage , res : ServerResponse , pathname : string , query : ParsedUrlQuery = { } ) : Promise < string | null > {
231231 try {
232232 // To make sure the try/catch is executed
233233 const html = await renderToHTML ( req , res , pathname , query , this . renderOpts )
@@ -243,13 +243,13 @@ export default class Server {
243243 }
244244 }
245245
246- public async renderError ( err : Error | null , req : IncomingMessage , res : ServerResponse , pathname : string , query : ParsedUrlQuery ) : Promise < void > {
246+ public async renderError ( err : Error | null , req : IncomingMessage , res : ServerResponse , pathname : string , query : ParsedUrlQuery = { } ) : Promise < void > {
247247 res . setHeader ( 'Cache-Control' , 'no-cache, no-store, max-age=0, must-revalidate' )
248248 const html = await this . renderErrorToHTML ( err , req , res , pathname , query )
249249 return this . sendHTML ( req , res , html )
250250 }
251251
252- public async renderErrorToHTML ( err : Error | null , req : IncomingMessage , res : ServerResponse , pathname : string , query : ParsedUrlQuery ) {
252+ public async renderErrorToHTML ( err : Error | null , req : IncomingMessage , res : ServerResponse , pathname : string , query : ParsedUrlQuery = { } ) {
253253 return renderErrorToHTML ( err , req , res , pathname , query , this . renderOpts )
254254 }
255255
0 commit comments