v1.18.x
Barış Soner Uşaklı 4 years ago
parent 10cfdd4c5d
commit 86f0f82be7

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

Loading…
Cancel
Save