diff --git a/src/api/posts.js b/src/api/posts.js index ae2cbecbac..30b4ba79f6 100644 --- a/src/api/posts.js +++ b/src/api/posts.js @@ -216,7 +216,7 @@ async function deleteOrRestoreTopicOf(command, pid, caller) { } postsAPI.purge = async function (caller, data) { - if (!data || !parseInt(data.pid, 10)) { + if (!data || !data.pid) { throw new Error('[[error:invalid-data]]'); }