From 9acfd50cfba33d73f3b76640bc6b9216dfaeb40f Mon Sep 17 00:00:00 2001 From: David Miller Date: Fri, 26 Nov 2021 22:17:11 +0000 Subject: [PATCH] Revert Node.js compatibilty change requiring Node.js 14 now --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 5068c38..5f99ffe 100644 --- a/index.js +++ b/index.js @@ -1300,7 +1300,7 @@ function makeThing( log, accessoryConfig, api ) { // MQTT set (Homekit get) if( getTopic ) { mqttSubscribe( getTopic, property, function( topic, message ) { - let data = message ? message.toString() : ''; + let data = message?.toString() ?? ''; let newState = mqttToHomekit[ data ]; if( newState !== undefined && ( eventOnly || state[ property ] != newState ) ) { if( config.logMqtt ) {