Skip to content

Commit 62c981f

Browse files
committed
Fix check on baseurl
1 parent 6e07aba commit 62c981f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

assets/js/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,10 +762,11 @@ if (elements.copier) {
762762
// --- Data Loading and Filtering ---
763763

764764
(async () => {
765-
if (!elements.searchInput || !document.body.dataset.baseurl) {
765+
if (!elements.searchInput) {
766766
return
767767
}
768-
const endpoint = document.body.dataset.baseurl + "/assets/plz.json";
768+
const baseurl = document.body.dataset.baseurl || ""
769+
const endpoint = baseurl + "/assets/plz.json";
769770
const result = await fetch(endpoint).then((blob) => blob.json());
770771

771772
const sorted = result.sort((a, b) => {

0 commit comments

Comments
 (0)