From d9ccbc4e6c6bb28b6b91e1f8e9b8e052789d1ce1 Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sat, 14 Nov 2020 19:10:18 -0500 Subject: [PATCH] fixes --- src/commands/score_hist.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/score_hist.ts b/src/commands/score_hist.ts index b7dfd22..8664992 100644 --- a/src/commands/score_hist.ts +++ b/src/commands/score_hist.ts @@ -26,7 +26,7 @@ export default class Score_Hist extends Command { user = message.author; if (!user) return this.error(message.channel, 'Member not found.'); const hists = await this.client.db.ScoreHistorical.find({ userID: user.id }).lean().exec(); - if (!hists) return this.error(message.channel, 'No history found.'); + if (!hists || hists?.length <= 0) return this.error(message.channel, 'No history found.'); const histArray: [{ name: string, value: string }?] = []; const totalArray: number[] = []; const activityArray: number[] = [];