fix subscription check on mute (#1177)

This commit is contained in:
keyan 2024-05-17 08:29:52 -05:00
parent a585ba7f0a
commit a71b9be03f
1 changed files with 1 additions and 1 deletions

View File

@ -749,7 +749,7 @@ export default {
}
}
})
if (subscription.postsSubscribedAt || subscription.commentsSubscribedAt) {
if (subscription?.postsSubscribedAt || subscription?.commentsSubscribedAt) {
throw new GraphQLError("you can't mute a stacker to whom you've subscribed", { extensions: { code: 'BAD_INPUT' } })
}
await models.mute.create({ data: { ...lookupData } })