From 40f5a7f043339f29d398d0800d1f7ec4ce1f6909 Mon Sep 17 00:00:00 2001 From: Dark <7890309+DarkView@users.noreply.github.com> Date: Sat, 11 Apr 2020 18:03:48 +0200 Subject: [PATCH] If statements must be braced --- backend/src/plugins/Tags.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/backend/src/plugins/Tags.ts b/backend/src/plugins/Tags.ts index c763fc6b..429a9ea5 100644 --- a/backend/src/plugins/Tags.ts +++ b/backend/src/plugins/Tags.ts @@ -106,27 +106,34 @@ export class TagsPlugin extends ZeppelinPlugin { }, timeXAgo(timeDiff) { - if (typeof timeDiff !== "string") + if (typeof timeDiff !== "string") { return 'Please pass a valid delay as a string to timeXAgo (e.g. timeXAgo("1w"))'; + } const delay = convertDelayStringToMS(timeDiff); return moment(moment().valueOf() - delay); }, humanizeTime(timems) { - if (typeof timems !== "number") return moment().format("DD-MM-YYYY HH:mm"); + if (typeof timems !== "number") { + return moment().format("DD-MM-YYYY HH:mm"); + } return moment(timems).format("DD-MM-YYYY HH:mm"); }, discordDateFormat(timems) { - if (typeof timems !== "number") return moment().format("YYYY-MM-DD"); + if (typeof timems !== "number") { + return moment().format("YYYY-MM-DD"); + } return moment(timems).format("YYYY-MM-DD"); }, mention: input => { - if (typeof input !== "string") return ""; + if (typeof input !== "string") { + return ""; + } if (input.match(/^<(@#)(!&)\d+>$/)) { return input; }