Skip to content

Commit

Permalink
chore: remove redundant checks in basicParser
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas authored and maeb committed Sep 16, 2024
1 parent 914dda2 commit 489cacd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions url/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,13 @@ func (p *parser) basicParser(urlOrRef string, base *Url, url *Url, stateOverride
if err := p.handleError(url, errors.MissingSchemeNonRelativeURL, true); err != nil {
return nil, err
}
} else if base != nil && base.path.isOpaque() && r == '#' {
} else if base.path.isOpaque() && r == '#' {
url.scheme = base.scheme
url.path = base.path // TODO: Ensure copy????
url.query = base.query
url.fragment = new(string)
state = stateFragment
} else if base != nil && base.scheme != "file" {
} else if base.scheme != "file" {
state = stateRelative
input.rewindLast()
} else {
Expand Down

0 comments on commit 489cacd

Please sign in to comment.