From d3b686e09ab092008ecbedd1c7f2f139a5ba4697 Mon Sep 17 00:00:00 2001 From: Matjaz Lipus Date: Tue, 2 Jun 2020 13:06:19 +0200 Subject: [PATCH] temperature sanity check is already done onload --- apps/locale/locale.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/locale/locale.html b/apps/locale/locale.html index 645d6b2db..ff1831466 100644 --- a/apps/locale/locale.html +++ b/apps/locale/locale.html @@ -164,10 +164,7 @@ exports = { name : "en_GB", currencySym:"£", var currency = locale.currency_first ? `${js(locale.currency_symbol)} + n.toFixed(2)`: `n.toFixed(2) + ${js(locale.currency_symbol)}`; - var temperature; - if (locale.temperature=='°C') temperature="t"; - else if (locale.temperature=='°F') temperature="(t*9/5)+32"; - else throw new Error("Unknown temperature unit "+locale.temperature); + var temperature = locale.temperature=='°F' ? '(t*9/5)+32' : 't'; var localeModule = `var l = ${js({ abday : locale.abday,