Skip to content

Commit

Permalink
refactor(index): merge concurrent array.push calls (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Jul 22, 2024
1 parent 0655453 commit 26cd10a
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 26cd10a

Please sign in to comment.