Skip to content

Node.js based forum software built for the modern web

revert: change toPid truthy

Barış Soner Uşaklı56523aa1480c
diff --git a/src/posts/create.js b/src/posts/create.js
index 8fb809efce..c95ba3535e 100644
--- a/src/posts/create.js
+++ b/src/posts/create.js
@@ -24,7 +24,7 @@ module.exports = function (Posts) {
throw new Error('[[error:invalid-uid]]');
}
- if (data.hasOwnProperty('toPid') && !utils.isNumber(data.toPid)) {
+ if (data.toPid && !utils.isNumber(data.toPid)) {
throw new Error('[[error:invalid-pid]]');
}