Set empty array instead of null to mediaIds property of posts
This commit is contained in:
parent
4e37ee541a
commit
8c41432907
10 changed files with 11 additions and 10 deletions
|
@ -254,7 +254,7 @@ module.exports = (params, user: IUser, app) => new Promise(async (res, rej) => {
|
|||
createdAt: new Date(),
|
||||
channelId: channel ? channel._id : undefined,
|
||||
index: channel ? channel.index + 1 : undefined,
|
||||
mediaIds: files ? files.map(file => file._id) : undefined,
|
||||
mediaIds: files ? files.map(file => file._id) : [],
|
||||
replyId: reply ? reply._id : undefined,
|
||||
repostId: repost ? repost._id : undefined,
|
||||
poll: poll,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue