mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-02 12:50:00 +01:00
dont crash if topic does not exist
This commit is contained in:
@@ -29,6 +29,9 @@ module.exports = function (SocketTopics) {
|
||||
}, next);
|
||||
},
|
||||
function (results, next) {
|
||||
if (!results.topic) {
|
||||
return next(new Error('[[error:no-topic]]'))
|
||||
}
|
||||
topic = results.topic;
|
||||
topic.privileges = results.privileges;
|
||||
plugins.fireHook('filter:topic.thread_tools', { topic: results.topic, uid: socket.uid, tools: [] }, next);
|
||||
|
||||
Reference in New Issue
Block a user