From ea37f44cfe33bcae976e60f46e937effb08aced3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?syuilo=E2=AD=90=EF=B8=8F?= Date: Fri, 24 Feb 2017 13:39:48 +0900 Subject: [PATCH] [API] Fix bug --- src/api/endpoints/posts/create.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/endpoints/posts/create.js b/src/api/endpoints/posts/create.js index b0cdc8a97..d9d1c1f4b 100644 --- a/src/api/endpoints/posts/create.js +++ b/src/api/endpoints/posts/create.js @@ -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,