From 69d008283900fc01fd6bc24e8e8b78c634b7369b Mon Sep 17 00:00:00 2001 From: keyan Date: Thu, 11 Aug 2022 16:42:52 -0500 Subject: [PATCH] fix null boolean --- 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 5540ced2..7fa7de75 100644 --- a/api/resolvers/item.js +++ b/api/resolvers/item.js @@ -890,7 +890,7 @@ const createItem = async (parent, { title, url, text, boost, forward, parentId } } } - const hasImgLink = mdHas(text, ['link', 'image']) + const hasImgLink = !!(text && mdHas(text, ['link', 'image'])) const [item] = await serialize(models, models.$queryRaw(