From 16193a2e7e2bff8e55bb7909615ce8239f6acdb8 Mon Sep 17 00:00:00 2001 From: Gordon Pedersen Date: Fri, 24 May 2024 10:59:33 +1000 Subject: [PATCH] fixed mention bug --- src/worker.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/worker.js b/src/worker.js index 8adf30a..d7a4537 100644 --- a/src/worker.js +++ b/src/worker.js @@ -112,8 +112,7 @@ async function handleLol(body, env) { // and similarly with fediverse mentions const mentions = content.match(/@[\w\-]+@[\w\-]+\.\S+/)?.filter((v,i,a) => a.indexOf(v) === i) - console.log(mentions) - for(let mention of mentions) { + if(mentions) for(let mention of mentions) { try{ const handle = mention.substring(1) const domain = handle.substring(handle.indexOf('@') + 1)