From d5066e46b3a5517a75e2a2c878998f11bfb94f4a Mon Sep 17 00:00:00 2001 From: felixs-alt <114471609+felixs-alt@users.noreply.github.com> Date: Tue, 26 Sep 2023 12:29:04 +0200 Subject: [PATCH] Update flipflop.js --- mods/flipflop.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/flipflop.js b/mods/flipflop.js index 0c826582..c5a9ef68 100644 --- a/mods/flipflop.js +++ b/mods/flipflop.js @@ -13,8 +13,8 @@ elements.flipflop = { let Powerstate = pixel.powerst let Output = pixelMap[pixel.x+1][pixel.y] let Input = pixelMap[pixel.x-1][pixel.y] - - if (typeof Output.x !== "undefined" && typeof Input.x !== "undefined"){ + console.log(Output) + if (typeof Output !== "null" && typeof Input !== "null"){ Output.charge = 0 if (Powerstate == "true" && Input.charge > 0.9) { Powerstate == "false"