[API] Fix bug

This commit is contained in:
syuilo⭐️ 2017-02-24 13:39:48 +09:00 committed by GitHub
parent ce0cfbdf84
commit ea37f44cfe
1 changed files with 1 additions and 1 deletions

View File

@ -243,7 +243,7 @@ module.exports = (params, user, app) =>
// 投稿を作成
const post = await Post.insert({
created_at: new Date(),
media_ids: files.length > 0 ? files.map(file => file._id) : undefined,
media_ids: files ? files.map(file => file._id) : undefined,
reply_to_id: replyTo ? replyTo._id : undefined,
repost_id: repost ? repost._id : undefined,
poll: poll ? poll : undefined,