From 70a6a7df7cff9506c346ed8413ae73b63488676f Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Debian Linux)" <rob@synchro.net>
Date: Fri, 4 Aug 2023 21:06:30 -0700
Subject: [PATCH] Don't publish "null" node input topic

get_ansi_seq() here can return null, don't pass that value to mqtt.publish()
which gets converted to a string.
---
 exec/mqtt_spy.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/exec/mqtt_spy.js b/exec/mqtt_spy.js
index eaa2c3def2..165c241f92 100755
--- a/exec/mqtt_spy.js
+++ b/exec/mqtt_spy.js
@@ -117,7 +117,8 @@ while(!js.terminated) {
 				else
 					key = get_ansi_seq();
 			}
-			mqtt.publish(in_topic, key);
+			if(key)
+				mqtt.publish(in_topic, key);
 		}
 	}
 }
-- 
GitLab