From f788f7a8921f030b4716d2d1a40fda69db41db92 Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Wed, 6 Jan 2021 19:09:57 -0700 Subject: [PATCH] Apply a quick hack to fix ?level URLs being blank --- js/main.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/main.js b/js/main.js index 2495f7e..c8a1e68 100644 --- a/js/main.js +++ b/js/main.js @@ -3674,6 +3674,11 @@ async function main() { conductor.player._start_in_debug_mode = true; } + // Cheap hack to make sure the tileset(s) have loaded before we go any further + // FIXME this can wait until we switch, it's not needed for the splash screen! but it's here + // for the moment because of ?level, do a better fix + await Promise.all(Object.values(conductor.tilesets).map(tileset => tileset.image.decode())); + // Pick a level (set) // TODO error handling :( let path = query.get('setpath');