diff --git a/api/resolvers/item.js b/api/resolvers/item.js index f936c3f7..4800c0b0 100644 --- a/api/resolvers/item.js +++ b/api/resolvers/item.js @@ -1059,7 +1059,7 @@ export const updateItem = async (parent, { sub: subName, forward, options, ...it if (Number(old.userId) !== Number(me?.id)) { throw new GraphQLError('item does not belong to you', { extensions: { code: 'FORBIDDEN' } }) } - if (old.subName !== subName) { + if (subName && old.subName !== subName) { const sub = await models.sub.findUnique({ where: { name: subName } }) if (old.freebie) { if (!sub.allowFreebies) {