From 92701e5cec29a013a3d5ec1d6d0f6d323bc5e3fe Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Sun, 2 Dec 2018 19:24:57 +0900 Subject: [PATCH] Fix #3445 (#3471) --- src/server/api/endpoints/notes.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/server/api/endpoints/notes.ts b/src/server/api/endpoints/notes.ts index f7b7b65ca4..b489197076 100644 --- a/src/server/api/endpoints/notes.ts +++ b/src/server/api/endpoints/notes.ts @@ -106,9 +106,7 @@ export default define(meta, (ps) => new Promise(async (res, rej) => { const withFiles = ps.withFiles != undefined ? ps.withFiles : ps.media; - if (withFiles) { - query.fileIds = withFiles ? { $exists: true, $ne: null } : []; - } + if (withFiles) query.fileIds = { $exists: true, $ne: null }; if (ps.poll != undefined) { query.poll = ps.poll ? { $exists: true, $ne: null } : null;