Skip to content

Commit b33ea4c

Browse files
committed
fix: correctly detext SharedArrayBuffer
1 parent a779486 commit b33ea4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2282,7 +2282,7 @@ interface HKDF extends KDF {
22822282
type KDF_BASE = Pick<KDF, 'Expand' | 'Extract' | 'Derive' | 'stages'>
22832283

22842284
function sab(input: ArrayBufferLike): input is SharedArrayBuffer {
2285-
return typeof SharedArrayBuffer === 'undefined' || input instanceof SharedArrayBuffer
2285+
return typeof SharedArrayBuffer !== 'undefined' && input instanceof SharedArrayBuffer
22862286
}
22872287

22882288
function ab(input: Uint8Array): ArrayBuffer {

0 commit comments

Comments
 (0)