This commit is contained in:
Barış Soner Uşaklı
2020-12-06 13:53:52 -05:00
parent 10cfdd4c5d
commit 86f0f82be7

View File

@@ -42,9 +42,9 @@ module.exports = function (Posts) {
}
function getType(data) {
if (data.tid && data.content) {
if (data.hasOwnProperty('tid')) {
return 'reply';
} else if (data.cid && data.title && data.content) {
} else if (data.hasOwnProperty('cid')) {
return 'topic';
}
throw new Error('[[error:invalid-type]]');