From c09e62aab8e015c0d9725afde7bad19fb2f77968 Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Sun, 26 Jul 2020 16:24:02 +0200 Subject: [PATCH] FORMAT: sort if/then/else statememt for better readability --- MMM-covid19.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MMM-covid19.js b/MMM-covid19.js index d8e9d8d..01a6e2d 100644 --- a/MMM-covid19.js +++ b/MMM-covid19.js @@ -116,14 +116,14 @@ Module.register("MMM-covid19", { // 0: normal (arrow right) // -0: green (arrow down) currentToLastWeekDiff = (data[this.config.region]["last_7"] * 2) - data[this.config.region]["last_14"] - if (currentToLastWeekDiff < 0) { - this.cases.trend = ""; - } else if (currentToLastWeekDiff == 0) { - this.cases.trend = "&#rarr;"; - } else if (currentToLastWeekDiff > 10) { + if (currentToLastWeekDiff > 10) { this.cases.trend = ""; } else if (currentToLastWeekDiff > 0) { this.cases.trend = ""; + } else if (currentToLastWeekDiff == 0) { + this.cases.trend = "&#rarr;"; + } else if (currentToLastWeekDiff < 0) { + this.cases.trend = ""; } }, });