Skip to content

Commit

Permalink
fix: add check for empty string url
Browse files Browse the repository at this point in the history
It's unlikely to hit here but it was missing coverage in the test suite.
  • Loading branch information
JackCuthbert committed Feb 7, 2022
1 parent 78605da commit 0164732
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function nextActuator(config: Partial<Config> = {}): NextApiHandler {
} = config

return async (req, res) => {
if (req.url == null) {
if (req.url == null || req.url === '') {
res.status(404).end()
return
}
Expand Down

0 comments on commit 0164732

Please sign in to comment.