Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Oct 19, 2020
1 parent 55e8942 commit 8f8fcfd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/next/next-server/server/image-optimizer.ts
Expand Up @@ -54,8 +54,8 @@ export async function imageOptimizer(

try {
hrefParsed = new URL(url)
isAbsolute = true
href = hrefParsed.toString()
isAbsolute = true
} catch (_error) {
res.statusCode = 400
res.end('"url" parameter is invalid')
Expand Down Expand Up @@ -187,11 +187,7 @@ export async function imageOptimizer(
mockRes.finished = false
mockRes.statusCode = 200

await server.getRequestHandler()(
_req,
mockRes,
nodeUrl.parse(href, true)
)
await server.getRequestHandler()(_req, mockRes, nodeUrl.parse(href, true))
res.statusCode = mockRes.statusCode

upstreamBuffer = Buffer.concat(resBuffers)
Expand Down

0 comments on commit 8f8fcfd

Please sign in to comment.