From fd984eddaa4c78e9903cfe22c1bbf06dd6d14033 Mon Sep 17 00:00:00 2001 From: felixs-alt <114471609+felixs-alt@users.noreply.github.com> Date: Tue, 26 Sep 2023 12:25:52 +0200 Subject: [PATCH] Update flipflop.js --- mods/flipflop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/flipflop.js b/mods/flipflop.js index 3e5acc6c..0c826582 100644 --- a/mods/flipflop.js +++ b/mods/flipflop.js @@ -14,7 +14,7 @@ elements.flipflop = { let Output = pixelMap[pixel.x+1][pixel.y] let Input = pixelMap[pixel.x-1][pixel.y] - if (Output.x != undefined && Input.x != undefined){ + if (typeof Output.x !== "undefined" && typeof Input.x !== "undefined"){ Output.charge = 0 if (Powerstate == "true" && Input.charge > 0.9) { Powerstate == "false"