diff options
| author | syuilo⭐️ <Syuilotan@yahoo.co.jp> | 2017-02-24 13:39:48 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-24 13:39:48 +0900 |
| commit | ea37f44cfe33bcae976e60f46e937effb08aced3 (patch) | |
| tree | 18fa2b2222148b4c071d25ba3c15f909cb17f009 | |
| parent | [API] Fix bug (diff) | |
| download | sharkey-ea37f44cfe33bcae976e60f46e937effb08aced3.tar.gz sharkey-ea37f44cfe33bcae976e60f46e937effb08aced3.tar.bz2 sharkey-ea37f44cfe33bcae976e60f46e937effb08aced3.zip | |
[API] Fix bug
| -rw-r--r-- | src/api/endpoints/posts/create.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/endpoints/posts/create.js b/src/api/endpoints/posts/create.js index b0cdc8a970..d9d1c1f4bf 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, |