revert: change toPid truthy

v1.18.x
Barış Soner Uşaklı 4 years ago
parent fcd887fd52
commit 56523aa148

@ -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]]');
}

Loading…
Cancel
Save