mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: crash in tests
This commit is contained in:
@@ -71,7 +71,7 @@ module.exports = function (Posts) {
|
||||
const topicData = await topics.getTopicFields(tid, ['cid', 'pinned']);
|
||||
postData.cid = topicData.cid;
|
||||
|
||||
const hasAttachment = _activitypub.attachment && _activitypub.attachment.length;
|
||||
const hasAttachment = _activitypub && _activitypub.attachment && _activitypub.attachment.length;
|
||||
|
||||
await Promise.all([
|
||||
db.sortedSetAdd('posts:pid', timestamp, postData.pid),
|
||||
|
||||
Reference in New Issue
Block a user