This commit is contained in:
Aya Morisawa 2018-12-02 19:24:57 +09:00 committed by syuilo
parent 31ffccf851
commit 4565b83053

View File

@ -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;