From 3758596a873c7efeb9cbdceff73fdd306f5e0733 Mon Sep 17 00:00:00 2001 From: thmsn <9084377+thmsndk@users.noreply.github.com> Date: Thu, 23 Nov 2023 01:44:09 +0000 Subject: [PATCH] prevent crash when looking up skins of sprite by x,y --- utility/htmls/imagesets/selector.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utility/htmls/imagesets/selector.html b/utility/htmls/imagesets/selector.html index c73ced8..a5d3447 100644 --- a/utility/htmls/imagesets/selector.html +++ b/utility/htmls/imagesets/selector.html @@ -76,7 +76,7 @@ for (const element of sprites) { const x = element.dataset.x; const y = element.dataset.y; - const skins = itemset_skins[x][y] ?? []; + const skins = itemset_skins[x] && itemset_skins[x][y] ? itemset_skins[x][y] : []; let hasPosition = false; let hasItem = false;