Skip to content

Commit

Permalink
Update function.ts
Browse files Browse the repository at this point in the history
Update getLen so it always returns a number
  • Loading branch information
brocococonut committed Sep 24, 2023
1 parent 664bb7a commit d62b931
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const getLen = (a: ArgType): ArgType => {
} else if (typeof a === "object") {
return Object.keys(a).length;
} else {
return NaN;
return 0;
}
};

Expand Down

0 comments on commit d62b931

Please sign in to comment.