« get me outta code hell

upd8: fix not defaulting to internal language properly - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-11-06 17:53:58 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-11-06 17:56:06 -0400
commit39a2f042cd6275f06977be6fe9335bd76fb94222 (patch)
tree182428e7f64a1dd476d86fb8585d1360921e99c6 /src
parentd497be7b5e1e4d9f9a8ca71de0a82def384467f8 (diff)
upd8: fix not defaulting to internal language properly
Diffstat (limited to 'src')
-rwxr-xr-xsrc/upd8.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/upd8.js b/src/upd8.js
index 408ad884..b1340989 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -1162,7 +1162,10 @@ async function main() {
   });
 
   const customDefaultLanguage =
-    languages[wikiData.wikiInfo.defaultLanguage ?? internalDefaultLanguage.code];
+    (wikiData.wikiInfo.defaultLanguage
+      ? languages[wikiData.wikiInfo.defaultLanguage]
+      : null);
+
   let finalDefaultLanguage;
 
   if (customDefaultLanguage) {