mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 01:56:12 +01:00
fix: #9068
This commit is contained in:
@@ -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]]');
|
||||||
|
|||||||
Reference in New Issue
Block a user