Skip to content

Commit

Permalink
fix: add missing check to isNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemorales committed Mar 13, 2024
1 parent bb42ee6 commit 0f0e739
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/number.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from './option';

export function isNumber(value: unknown): value is number {
return !Number.isNaN(value);
return typeof value === 'number' && !Number.isNaN(value);
}

export function add(addend: number): (augend: number) => number {
Expand Down

0 comments on commit 0f0e739

Please sign in to comment.