Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
squash: second refack nit
  • Loading branch information
Trott committed Jul 7, 2017
commit 5da6124a3a0f3512656dec99bca7e118fa984e89
7 changes: 3 additions & 4 deletions lib/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,9 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) {
this.query = Object.create(null);
}

var firstIdx =
questionIdx !== -1 && (hashIdx === -1 || questionIdx < hashIdx) ?
questionIdx :
hashIdx;
const useQuestionIdx =
questionIdx !== -1 && (hashIdx === -1 || questionIdx < hashIdx);
const firstIdx = useQuestionIdx ? questionIdx : hashIdx;
if (firstIdx === -1) {
if (rest.length > 0)
this.pathname = rest;
Expand Down