const checkIfLinked = async () => {
const currentUser = Moralis.User.current();
const accounts = await currentUser.attributes.account;
let accountLinked: boolean;
if (accounts !== undefined) {
return (accountLinked = accounts.includes(
connector
));
} else {
accountLinked = false;
return accountLinked;
}
};
you could check if currentUser is defined or not
yes current user is defined⦠i used email to logged in
I mean to check the variable when is undefined, from that error it looks like it is undefined