Skip to content

Commit

Permalink
bytes: fix isBytes check
Browse files Browse the repository at this point in the history
  • Loading branch information
ChALkeR committed Aug 26, 2021
1 parent c41b89a commit 09951c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/bytes/src.ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function isBytes(value: any): value is Bytes {

for (let i = 0; i < value.length; i++) {
const v = value[i];
if (typeof(v) !== "number" || v < 0 || v >= 256 || (v % 1)) {
if (!Number.isInteger(v) || v < 0 || v >= 256) {
return false;
}
}
Expand Down

0 comments on commit 09951c8

Please sign in to comment.