Fix metric unit detection (#1496)

This commit is contained in:
Tim Wilkinson 2024-09-12 21:27:16 -07:00 committed by GitHub
parent 88120bcff6
commit 36bddd2619
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ let metric = null;
function isMetric()
{
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) {
metric = false;
}