Skip to content

Commit

Permalink
fix: prevent non-number use in number matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed May 30, 2024
1 parent 3329139 commit d0ee6c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/v3/matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export const decimal = (num?: number): Matcher<number> => {
* @param num Example value. If omitted a random integer value will be generated.
*/
export function number(num?: number): Matcher<number> {
if (num && typeof num === 'number') {
if (typeof num === 'number') {
return {
'pact:matcher:type': 'number',
value: num,
Expand Down

0 comments on commit d0ee6c4

Please sign in to comment.