From 6cee6fbf9104dc005ff8319e7ddeefd3b3e2e523 Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Mon, 18 Jan 2021 22:46:46 +0100 Subject: [PATCH] fix eslint errors --- public/trivabble.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/public/trivabble.js b/public/trivabble.js index 717ebd8..1bfe8d6 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -102,7 +102,7 @@ } else { console.error("Unsupported type"); } - } else if (defaultValue !== undefined) { + } else if (typeof defaultValue !== "undefined") { return defaultValue; } @@ -165,7 +165,10 @@ const trivabble = window.trivabble = {l10n: _}; function format(s, v1, v2, v3) { - return s.replace("{0}", v1).replace("{1}", v2).replace("{2}", v3); + return s + .replace("{0}", v1) + .replace("{1}", v2) + .replace("{2}", v3); } let board; @@ -2268,7 +2271,7 @@ setTimerState(getSetting("TimerEnable", getSetting("ENABLE_TIMER"))); } - let timerTimeout = 0 + let timerTimeout = 0; function updateTimer() { const currentTimer = timerDate(); @@ -2280,7 +2283,7 @@ setSetting("TimerEnable", enabled); if (timerTimeout) { clearInterval(timerTimeout); - timerTimeout = 0 + timerTimeout = 0; } if (enabled) { -- 2.30.2