diff --git a/frontend-react/src/components/plus/Suggestions.js b/frontend-react/src/components/plus/Suggestions.js
index f0ef614fb..59688d6a8 100644
--- a/frontend-react/src/components/plus/Suggestions.js
+++ b/frontend-react/src/components/plus/Suggestions.js
@@ -78,6 +78,7 @@ const Suggestions = ({
if (loading || vouchesLoading) return
if (error) return
if (vouchesError) return
+ if (!data.suggestions) return null
const ownSuggestion = data.suggestions.find(
suggestion =>
diff --git a/graphql-schemas/plus.js b/graphql-schemas/plus.js
index e051787d0..df7f6d1b9 100644
--- a/graphql-schemas/plus.js
+++ b/graphql-schemas/plus.js
@@ -14,7 +14,7 @@ const typeDef = gql`
extend type Query {
plusInfo: PlusGeneralInfo
hasAccess(discord_id: String!, server: String!): Boolean!
- suggestions: [Suggested!]!
+ suggestions: [Suggested!]
vouches: [User!]
usersForVoting: UsersForVoting!
summaries: [Summary!]
@@ -275,7 +275,8 @@ const resolvers = {
return { users, suggested, votes }
},
suggestions: (root, args, ctx) => {
- if (!ctx.user || !ctx.user.plus) return null
+ if (!ctx.user || !ctx.user.plus || !ctx.user.plus.membership_status)
+ return null
const searchCriteria =
ctx.user.plus.membership_status === "ONE" ? {} : { plus_server: "TWO" }
return Suggested.find(searchCriteria)
@@ -289,7 +290,7 @@ const resolvers = {
})
},
vouches: (root, args, { user }) => {
- if (!user || !user.plus) return null
+ if (!user || !user.plus || !user.plus.membership_status) return null
const searchCriteria =
user.plus.membership_status === "ONE"
? { "plus.vouch_status": { $ne: null } }