mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 16:57:08 +02: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']);
|
const topicData = await topics.getTopicFields(tid, ['cid', 'pinned']);
|
||||||
postData.cid = topicData.cid;
|
postData.cid = topicData.cid;
|
||||||
|
|
||||||
const hasAttachment = _activitypub.attachment && _activitypub.attachment.length;
|
const hasAttachment = _activitypub && _activitypub.attachment && _activitypub.attachment.length;
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
db.sortedSetAdd('posts:pid', timestamp, postData.pid),
|
db.sortedSetAdd('posts:pid', timestamp, postData.pid),
|
||||||
|
|||||||
Reference in New Issue
Block a user