From f96c9c407f2bdd9644cd6e9d5e005b8d6acbb1e7 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sat, 24 Dec 2022 22:05:12 -0600 Subject: [PATCH] Potential fix for infinite resets bug --- src/data/layers/packing.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/data/layers/packing.tsx b/src/data/layers/packing.tsx index 4bbf995..27bfa79 100644 --- a/src/data/layers/packing.tsx +++ b/src/data/layers/packing.tsx @@ -65,7 +65,11 @@ const layer = createLayer(id, function (this: BaseLayer) { }, visibility: () => showIf(Decimal.lt(packedPresents.value, 8e9) && Decimal.lte(remainingSize.value, 0)), - onClick: packingReset.reset + onClick() { + if (unref(this.canClick)) { + packingReset.reset(); + } + } })); const packingProgress = persistent(0);