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(