mirror of https://github.com/aredn/aredn.git
Fix metric unit detection (#1496)
This commit is contained in:
parent
88120bcff6
commit
36bddd2619
|
@ -38,7 +38,7 @@ let metric = null;
|
||||||
function isMetric()
|
function isMetric()
|
||||||
{
|
{
|
||||||
if (metric === null) {
|
if (metric === null) {
|
||||||
const lang = request?.env?.HTTP_ACCEPT_LANGUAGE || "en-US";
|
const lang = split(request?.env?.HTTP_ACCEPT_LANGUAGE || "en-US", ",")[0];
|
||||||
if (index(lang, "-US") !== -1 || index(lang, "-GB") !== -1) {
|
if (index(lang, "-US") !== -1 || index(lang, "-GB") !== -1) {
|
||||||
metric = false;
|
metric = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue