Skip to content

Commit

Permalink
refactor(index): merge concurrent array.push calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Jul 19, 2024
1 parent 0655453 commit d04c8dd
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ function serialize (cmpts, opts) {
}

if (options.reference !== 'suffix' && components.scheme) {
uriTokens.push(components.scheme)
uriTokens.push(':')
uriTokens.push(components.scheme, ':')
}

const authority = recomposeAuthority(components, options)
Expand Down Expand Up @@ -166,13 +165,11 @@ function serialize (cmpts, opts) {
}

if (components.query !== undefined) {
uriTokens.push('?')
uriTokens.push(components.query)
uriTokens.push('?', components.query)
}

if (components.fragment !== undefined) {
uriTokens.push('#')
uriTokens.push(components.fragment)
uriTokens.push('#', components.fragment)
}
return uriTokens.join('')
}
Expand Down

0 comments on commit d04c8dd

Please sign in to comment.