Skip to content

Commit

Permalink
Remove common caught exception (#1156)
Browse files Browse the repository at this point in the history
  • Loading branch information
sliftist authored Mar 9, 2024
1 parent 53cb3a0 commit 2fb3f59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/_util/is.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ export function isNativeBigIntTypedArray(value) {
*/
function isArrayBuffer(value) {
try {
// ArrayBuffers are never arrays
if (ArrayIsArray(value)) {
return false;
}
ArrayBufferPrototypeGetByteLength(/** @type {any} */ (value));
return true;
} catch (e) {
Expand Down

0 comments on commit 2fb3f59

Please sign in to comment.