Merge pull request #19384 from Snuffleupagus/isNumberArray-fix-BigInt-check
Handle *empty* BigInt64Array/BigUint64Array in the `isNumberArray` helper
This commit is contained in:
commit
b0b9552216
@ -280,7 +280,7 @@ function isNumberArray(arr, len) {
|
||||
// BigInt64Array/BigUint64Array types (their elements aren't "number").
|
||||
return (
|
||||
ArrayBuffer.isView(arr) &&
|
||||
(arr.length === 0 || typeof arr[0] === "number") &&
|
||||
!(arr instanceof BigInt64Array || arr instanceof BigUint64Array) &&
|
||||
(len === null || arr.length === len)
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user