From 1a6c91f4e9f764af185bf339a8f6d123273be02a Mon Sep 17 00:00:00 2001 From: tobspr Date: Tue, 18 Aug 2020 20:07:44 +0200 Subject: [PATCH] Fix crash --- src/js/game/systems/logic_gate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/game/systems/logic_gate.js b/src/js/game/systems/logic_gate.js index 1921cb9d..faf95110 100644 --- a/src/js/game/systems/logic_gate.js +++ b/src/js/game/systems/logic_gate.js @@ -228,7 +228,7 @@ export class LogicGateSystem extends GameSystemWithFilter { const lowerLayer = /** @type {import("../shape_definition").ShapeLayer} */ (definition.layers[0]); const topRightContent = lowerLayer[0]; - if (!topRightContent) { + if (!topRightContent || topRightContent.subShape === null) { return [null, null]; }