Skip to content

Commit

Permalink
fix method args
Browse files Browse the repository at this point in the history
  • Loading branch information
Achthar committed Aug 12, 2024
1 parent b9335d2 commit 93ca342
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1delta/redux-multicall-viem",
"version": "1.1.8",
"version": "1.1.9",
"description": "A React + Redux lib for fetching and caching chain state via the MultiCall contract",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export type MethodArg = string | number | BigInt
export type MethodArgs = Array<MethodArg | MethodArg[]>

export function isMethodArg(x: unknown): x is MethodArg {
return typeof BigInt(x as any) === 'bigint' || ['string', 'number'].indexOf(typeof x) !== -1
return (x === null || x === undefined) ? false : typeof BigInt(x as any) === 'bigint' || ['string', 'number'].indexOf(typeof x) !== -1
}

export function isValidMethodArgs(x: unknown): x is MethodArgs | undefined {
Expand Down

0 comments on commit 93ca342

Please sign in to comment.