Node.js based forum software built for the modern web
fix: throw error if topic does not exist
Barış Soner Uşaklı59cf0e80d270
diff --git a/src/topics/tools.js b/src/topics/tools.jsindex 6a1fdf1cd7..b91ddebd79 100644--- a/src/topics/tools.js+++ b/src/topics/tools.js@@ -64,7 +64,7 @@ module.exports = function (Topics) {topicTools.purge = async function (tid, uid) {const topicData = await Topics.getTopicData(tid);if (!topicData) {- return;+ throw new Error('[[error:no-topic]]');}const canPurge = await privileges.topics.canPurge(tid, uid);if (!canPurge) {