From a0a4ce4dd9d649839da7862e206f47d1c27de2c2 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 f407f3bd56..608027f6b1 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))));