summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-21 23:08:00 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-22 20:07:00 +0200
commit050644d3560802625132bf01162fac9659bd0f47 (patch)
treef827520a3d32ea5870e318b92e19dadbdf219c83 /play.js
parent3ff8a3894a88a96870088a113773380f2f41237f (diff)
downloadplantagenet-050644d3560802625132bf01162fac9659bd0f47.tar.gz
Optimize data access.
TODO: sort the locales for simpler tests.
Diffstat (limited to 'play.js')
-rw-r--r--play.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/play.js b/play.js
index 0dd878f..cb3ffc5 100644
--- a/play.js
+++ b/play.js
@@ -739,7 +739,7 @@ function build_map() {
locale_layout[i] = []
data.locales.forEach((locale, ix) => {
- let region = clean_name(locale.region)
+ let region = locale.region ? clean_name(locale.region) : ""
let { x, y, w, h } = locale.box
let xc = Math.round(x + w / 2)
let yc = Math.round(y + h / 2)