Skip to content

Commit

Permalink
_assert: fix isBytes
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Dec 10, 2023
1 parent cb759dd commit 1792f61
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/_assert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ function bool(b: boolean) {
// copied from utils
function isBytes(a: unknown): a is Uint8Array {
return (
a != null &&
typeof a === 'object' &&
(a instanceof Uint8Array || a.constructor.name === 'Uint8Array')
a instanceof Uint8Array ||
(a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array')
);
}

Expand Down

0 comments on commit 1792f61

Please sign in to comment.