From e441ec48734045aafaead0579db27eeda1d35cb5 Mon Sep 17 00:00:00 2001 From: Amanda McCann Date: Mon, 22 Apr 2024 11:11:04 +0200 Subject: [PATCH] fix JS --- docs/js/setup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/js/setup.js b/docs/js/setup.js index b50d80d..3ceda8a 100644 --- a/docs/js/setup.js +++ b/docs/js/setup.js @@ -33,7 +33,7 @@ document.addEventListener("alpine:init", async () => { let params = new URLSearchParams((location.hash ?? "#").substr(1)); let len_filter = decodeFilterParams(params.get("len") ?? ""); let selected_tileset_key = params.get("tiles") ?? tilesets.selected_tileset; - if (!(selected_tileset_key in tilesets.tilesets)) { + if (!tilesets.tilesets.map(t => t.key).some(t => selected_tileset_key == t)) { console.error( "The selected tileset " + selected_tileset_key +