fix eslint errors

This commit is contained in:
Laurent Mazet 2021-04-20 22:13:09 +02:00
parent afba7b12c4
commit 8f674f3848
1 changed files with 8 additions and 5 deletions

View File

@ -103,7 +103,7 @@
} else {
console.error("Unsupported type");
}
} else if (defaultValue !== undefined) {
} else if (typeof defaultValue !== "undefined") {
return defaultValue;
}
@ -160,7 +160,7 @@
PlayerName: "string",
SpellCheckerEnabledOnce: "boolean",
TimerGameDate: "number",
TimerTurnDate: "number",
TimerTurnDate: "number"
};
const _ = (window.libD && libD.l10n) ? libD.l10n() : function (s) {
@ -170,7 +170,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;
@ -2281,7 +2284,7 @@
setTimerState(getSetting("ENABLE_TIMER"));
}
let timerTimeout = 0
let timerTimeout = 0;
function updateTimer() {
const currentTimer = timerDate();
@ -2293,7 +2296,7 @@
setSetting("ENABLE_TIMER", enabled);
if (timerTimeout) {
clearInterval(timerTimeout);
timerTimeout = 0
timerTimeout = 0;
}
if (enabled) {