Skip to content

Commit d8ed4ac

Browse files
committed
fixup
1 parent a3306a4 commit d8ed4ac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/fetch/headers.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ class HeadersList {
276276
const firstValue = iterator.next().value
277277
// set [name, value] to first index.
278278
array[0] = [firstValue[0], firstValue[1].value]
279+
// https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine
280+
// 3.2.2. Assert: value is non-null.
281+
assert(firstValue[1].value !== null)
279282
for (
280283
let i = 1, j = 0, right = 0, left = 0, pivot = 0, x, value;
281284
i < size;
@@ -287,7 +290,7 @@ class HeadersList {
287290
x = array[i] = [value[0], value[1].value]
288291
// https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine
289292
// 3.2.2. Assert: value is non-null.
290-
assert(value[1].value !== null)
293+
assert(x[1] !== null)
291294
left = 0
292295
right = i
293296
// binary search

0 commit comments

Comments
 (0)