Skip to content

Commit 44969e2

Browse files
authored
Merge pull request #21 from doug-wade/fix-19
feat(#19): Log and return early if community is not found
2 parents cf70f11 + 65fb97d commit 44969e2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main.js

+5
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,11 @@ const bot = new LemmyBot.LemmyBot({
316316
name: community,
317317
instance: instance,
318318
});
319+
320+
if (!communityId) {
321+
console.error(`Could not find community ${community} on instance ${instance}`);
322+
return;
323+
}
319324

320325
let title = item.title;
321326
title = parseTags(title);

0 commit comments

Comments
 (0)