Skip to content

Commit

Permalink
Revert Node.js compatibilty change
Browse files Browse the repository at this point in the history
requiring Node.js 14 now
  • Loading branch information
arachnetech committed Nov 26, 2021
1 parent bf81779 commit 9acfd50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit 9acfd50

Please sign in to comment.