Skip to content

Commit

Permalink
perf: only append non empty search to path
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Mar 27, 2021
1 parent d056c20 commit e8ece2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function dispatchFromAgent (fn) {
}

const { origin, pathname, search } = util.parseURL(url)
const path = `${pathname}${search || ''}`
const path = search ? `${pathname}${search}` : pathname

return fn.call(agent, { ...opts, origin, method, path }, ...additionalArgs)
}
Expand Down

0 comments on commit e8ece2a

Please sign in to comment.