From ec2ac6e698a99d44fcbb81768c18460e19400fc5 Mon Sep 17 00:00:00 2001 From: keyan Date: Fri, 26 Aug 2022 21:57:41 -0500 Subject: [PATCH] fix comment editing validation --- api/resolvers/item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/resolvers/item.js b/api/resolvers/item.js index 402af06a..c4e79ff6 100644 --- a/api/resolvers/item.js +++ b/api/resolvers/item.js @@ -877,7 +877,7 @@ export const updateItem = async (parent, { id, data: { title, url, text, boost, throw new UserInputError(`boost must be at least ${BOOST_MIN}`, { argumentName: 'boost' }) } - if (!parentId && title.length > MAX_TITLE_LENGTH) { + if (!old.parentId && title.length > MAX_TITLE_LENGTH) { throw new UserInputError('title too long') }