fix: Call hasUserKeys() on user argument (#1295)

This commit is contained in:
Jonathan Como
2020-10-01 21:47:12 -07:00
committed by GitHub
parent 5cd08b3f98
commit f61b731fb3

View File

@@ -50,7 +50,7 @@ const runSDK = ({ baseUrl, websiteToken }) => {
throw new Error('Identifier should be a string or a number');
}
if (!hasUserKeys()) {
if (!hasUserKeys(user)) {
throw new Error(
'User object should have one of the keys [avatar_url, email, name]'
);