Node.js based forum software built for the modern web
refactor: remove exits check
Barış Soner Uşaklı74dd2844a015
diff --git a/src/topics/events.js b/src/topics/events.jsindex 13ab489c63..5d163f4977 100644--- a/src/topics/events.js+++ b/src/topics/events.js@@ -111,10 +111,8 @@ function renderTimeago(event) {}Events.get = async (tid, uid, reverse = false) => {- const topics = require('.');-- if (!await topics.exists(tid)) {- throw new Error('[[error:no-topic]]');+ if (!tid) {+ return [];}let eventIds = await db.getSortedSetRangeWithScores(`topic:${tid}:events`, 0, -1);