From 9ef61e0dcfb33d4cc21d70a58fff7e51368e9ab4 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Sun, 4 Oct 2020 21:24:05 +0300 Subject: [PATCH] fix user page crash with no placements --- graphql-schemas/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphql-schemas/user.js b/graphql-schemas/user.js index d94b8130b..6a7a59e35 100644 --- a/graphql-schemas/user.js +++ b/graphql-schemas/user.js @@ -82,7 +82,7 @@ const resolvers = { `https://cdn.discordapp.com/avatars/${root.discordId}/${root.discordAvatar}.jpg`, profilePath: (root) => "/u/" + root.discordId, xRankPlacements: (root, _, ctx) => - ctx.xRankPlacementLoader.load(root.playerId), + root.playerId ? ctx.xRankPlacementLoader.load(root.playerId) : null, }, User: { top500: async (root) => {