1
0
forked from mirror/misskey
This commit is contained in:
syuilo 2018-09-15 05:42:14 +09:00
parent c985fed3e4
commit fc31e44fd2
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import Meta from '../../../../models/meta';
export default () => new Promise(async (res, rej) => { export default () => new Promise(async (res, rej) => {
const meta = await Meta.findOne({}); const meta = await Meta.findOne({});
const hidedTags = (meta.hidedTags || []).map(t => t.toLowerCase()); const hidedTags = meta ? (meta.hidedTags || []).map(t => t.toLowerCase()) : [];
const span = 1000 * 60 * 60 * 24 * 7; // 1週間 const span = 1000 * 60 * 60 * 24 * 7; // 1週間

View File

@ -19,7 +19,7 @@ const max = 5;
*/ */
export default () => new Promise(async (res, rej) => { export default () => new Promise(async (res, rej) => {
const meta = await Meta.findOne({}); const meta = await Meta.findOne({});
const hidedTags = (meta.hidedTags || []).map(t => t.toLowerCase()); const hidedTags = meta ? (meta.hidedTags || []).map(t => t.toLowerCase()) : [];
//#region 1. 直近Aの内に投稿されたハッシュタグ(とユーザーのペア)を集計 //#region 1. 直近Aの内に投稿されたハッシュタグ(とユーザーのペア)を集計
const data = await Note.aggregate([{ const data = await Note.aggregate([{