mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Fix the TypeError of isValidTLSArray for http (https://github.com/oven-sh/bun/issues/7153) (#7154)
This commit is contained in:
@@ -96,11 +96,13 @@ function isValidTLSArray(obj) {
|
||||
if (typeof obj === "string" || isTypedArray(obj) || obj instanceof ArrayBuffer || obj instanceof Blob) return true;
|
||||
if (Array.isArray(obj)) {
|
||||
for (var i = 0; i < obj.length; i++) {
|
||||
if (typeof obj !== "string" && !isTypedArray(obj) && !(obj instanceof ArrayBuffer) && !(obj instanceof Blob))
|
||||
const item = obj[i];
|
||||
if (typeof item !== "string" && !isTypedArray(item) && !(item instanceof ArrayBuffer) && !(item instanceof Blob))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
class ERR_INVALID_ARG_TYPE extends TypeError {
|
||||
|
||||
Reference in New Issue
Block a user