Skip to content

Commit 9a32945

Browse files
committed
fix in useScQuery
1 parent 7f81079 commit 9a32945

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hooks/core/useScQuery.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ export function useScQuery<T extends number | string | boolean | unknown>({
9292
});
9393

9494
const parseData = (data: string | number | undefined | unknown) => {
95+
if (data === undefined || data === null) return;
96+
9597
if (type === SCQueryType.COMPLEX && !abiJSON) {
9698
throw new Error(
9799
'Please provide the ABI JSON contents if you want to use the COMPLEX queries in useScQuery! Check README.md for more info.'

0 commit comments

Comments
 (0)