From f8bc0bd2b544ad32fdc09ba423ec8a6bccc8aa5c Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Fri, 18 Feb 2022 19:23:55 +0100 Subject: [PATCH] Removed unnecessary if. --- wled00/ir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wled00/ir.cpp b/wled00/ir.cpp index e7516b84..00041788 100644 --- a/wled00/ir.cpp +++ b/wled00/ir.cpp @@ -605,9 +605,10 @@ void decodeIRJson(uint32_t code) if (!cmdStr.startsWith("win&")) { cmdStr = "win&" + cmdStr; } + fdo.clear(); //clear JSON buffer (it is no longer needed) handleSet(nullptr, cmdStr, false); // no colorUpdated() call here } - } else if (!jsonCmdObj.isNull()) { + } else { // command is JSON object if (jsonCmdObj[F("psave")].isNull()) deserializeState(jsonCmdObj, CALL_MODE_BUTTON_PRESET); else {