From 324a974dec58d117ff79382b947ba6df9bdf1764 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 11 Oct 2018 17:00:22 +0900 Subject: [PATCH] Fix bug --- src/models/note.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/models/note.ts b/src/models/note.ts index 5687151d80..a47fd098c7 100644 --- a/src/models/note.ts +++ b/src/models/note.ts @@ -386,14 +386,16 @@ export const pack = async ( return null; } - if (_note.replyId != null && _note.reply == null) { - console.warn(`[DAMAGED DB] (missing) pkg: note -> reply :: ${_note.id} (reply ${_note.replyId})`); - return null; - } + if (opts.detail) { + if (_note.replyId != null && _note.reply == null) { + console.warn(`[DAMAGED DB] (missing) pkg: note -> reply :: ${_note.id} (reply ${_note.replyId})`); + return null; + } - if (_note.renoteId != null && _note.renote == null) { - console.warn(`[DAMAGED DB] (missing) pkg: note -> renote :: ${_note.id} (renote ${_note.renoteId})`); - return null; + if (_note.renoteId != null && _note.renote == null) { + console.warn(`[DAMAGED DB] (missing) pkg: note -> renote :: ${_note.id} (renote ${_note.renoteId})`); + return null; + } } //#endregion