« get me outta code hell

upd8: don't crash without web routes - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-05-05 21:55:24 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-05-31 12:11:50 -0300
commite5d214a624cb06e8985d63aa073082113f9a1901 (patch)
tree751760a11cd5e6a51ce880b204823ba5957e636c
parentda951b7f18b8a67c60de96b1b506a1b1a825bbbd (diff)
upd8: don't crash without web routes
-rwxr-xr-xsrc/upd8.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/upd8.js b/src/upd8.js
index e135e056..1585fdd4 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -2216,8 +2216,10 @@ async function main() {
   }
 
   wikiData.wikiInfo.searchDataAvailable =
-    webRouteSources
-      .some(({to}) => to[0].startsWith('searchData'));
+    (webRouteSources
+      ? webRouteSources
+          .some(({to}) => to[0].startsWith('searchData'))
+      : null);
 
   if (stepStatusSummary.performBuild.status === STATUS_NOT_APPLICABLE) {
     return true;