mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
refactor: remove exits check
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user