useMoralisQuery makes error

const { Moralis, chainId, user, isWeb3Enabled, account } = useMoralis();

const { data, error, isLoading } = useMoralisQuery(“AvaxBears”, query=>query.equalTo(“Owner”, account));

console.log(account);

This function produces empty results, but if I put the log of the account directly, the result will be obtained. What’s the problem?

what is the version that works?

you mean the version of server?

I use the latest version of everything


when I use the account in UseMoralis
I could only get empty query
and when I put the account directly in the log it works again

what’s the problem?

I don’t know what you mean by this

it works when I put the address directly into the account like
const { data, error, isLoading } = useMoralisQuery(“AvaxBears”, query=>query.equalTo(“Owner”, “0xa32…”));

but when I use account from UseMoralis, it just gives me empty array
const { data, error, isLoading } = useMoralisQuery(“AvaxBears”, query=>query.equalTo(“Owner”, account));

I also checked the log of account and it showed correct address

strange, can you also print the type of that account variable? maybe it is a number and not a string

I already checked it… Please check this function in the team. I guess it’s problem of ‘equalTo’ function of Query