fix eslint errors
authorLaurent Mazet <mazet@softndesign.org>
Mon, 18 Jan 2021 21:46:46 +0000 (22:46 +0100)
committerLaurent Mazet <mazet@softndesign.org>
Mon, 18 Jan 2021 21:46:46 +0000 (22:46 +0100)
public/trivabble.js

index 717ebd8c7f69519d3288c9476454f893ca761ab1..1bfe8d6eca2a2d8e3aca66fe8b1b1b1880608dc8 100644 (file)
             } else {
                 console.error("Unsupported type");
             }
-        } else if (defaultValue !== undefined) {
+        } else if (typeof defaultValue !== "undefined") {
             return defaultValue;
         }
 
     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;
         setTimerState(getSetting("TimerEnable", getSetting("ENABLE_TIMER")));
     }
 
-    let timerTimeout = 0
+    let timerTimeout = 0;
 
     function updateTimer() {
         const currentTimer = timerDate();
         setSetting("TimerEnable", enabled);
         if (timerTimeout) {
             clearInterval(timerTimeout);
-            timerTimeout = 0
+            timerTimeout = 0;
         }
 
         if (enabled) {