Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
tsctx committed Feb 21, 2024
1 parent a3306a4 commit d8ed4ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/fetch/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ class HeadersList {
const firstValue = iterator.next().value
// set [name, value] to first index.
array[0] = [firstValue[0], firstValue[1].value]
// https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine
// 3.2.2. Assert: value is non-null.
assert(firstValue[1].value !== null)
for (
let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value;
i < size;
Expand All @@ -287,7 +290,7 @@ class HeadersList {
x = array[i] = [value[0], value[1].value]
// https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine
// 3.2.2. Assert: value is non-null.
assert(value[1].value !== null)
assert(x[1] !== null)
left = 0
right = i
// binary search
Expand Down

0 comments on commit d8ed4ac

Please sign in to comment.