From 7f7308190fd38748dc931f8e3819af84d74b9e83 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 29 May 2018 11:25:28 +0900 Subject: [PATCH] Fix bug --- src/server/api/endpoints/notes/replies.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/api/endpoints/notes/replies.ts b/src/server/api/endpoints/notes/replies.ts index f407f3bd5..608027f6b 100644 --- a/src/server/api/endpoints/notes/replies.ts +++ b/src/server/api/endpoints/notes/replies.ts @@ -26,7 +26,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => { return rej('note not found'); } - const ids = note._replyIds.slice(offset, offset + limit); + const ids = (note._replyIds || []).slice(offset, offset + limit); // Serialize res(await Promise.all(ids.map(id => pack(id, user))));