aboutsummaryrefslogtreecommitdiffstats
path: root/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'main.js')
-rw-r--r--main.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.js b/main.js
index 8169ff5..cbde618 100644
--- a/main.js
+++ b/main.js
@@ -3792,7 +3792,9 @@ const infoMetadataAccordions = [];
value.nodeValue = formatters[1].format(v/10_000);
} else {
unit.nodeValue = 'km²';
- value.nodeValue = formatters[1].format(v/1_000_000);
+ v /= 1_000_000;
+ const i = v < 1_000_000 ? 1 : 0; /* ≥10⁶ km² overflows the box with 2 decimals */
+ value.nodeValue = formatters[i].format(v);
}
};
})();