oops, fix crash when no neomail contact exists
This commit is contained in:
parent
b28d8256b8
commit
f832cb9acb
1 changed files with 4 additions and 0 deletions
|
@ -28,6 +28,10 @@ const resolvers = {
|
|||
{ userLoader, neopetsConnectionLoader }
|
||||
) => {
|
||||
const user = await userLoader.load(id);
|
||||
if (user.contactNeopetsConnectionId == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const neopetsConnection = await neopetsConnectionLoader.load(
|
||||
user.contactNeopetsConnectionId
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue