Skip to content

Commit

Permalink
Improve compatibility with older Node.js versions
Browse files Browse the repository at this point in the history
  • Loading branch information
arachnetech committed Oct 17, 2021
1 parent b2f39c5 commit b048d70
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

# Homebridge MQTT-Thing: Release Notes

### Version 1.1.32
+ Improve compatibility with older Node.js versions

### Version 1.1.31
+ Improve null handling (multicharacteristic) (thanks, Jakub Samek)
+ Added optimizePublishing option
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ function makeThing( log, accessoryConfig, api ) {
// MQTT set (Homekit get)
if( getTopic ) {
mqttSubscribe( getTopic, property, function( topic, message ) {
let data = message?.toString() ?? '';
let data = message ? message.toString() : '';
let newState = mqttToHomekit[ data ];
if( newState !== undefined && ( eventOnly || state[ property ] != newState ) ) {
if( config.logMqtt ) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-mqttthing",
"version": "1.1.31",
"version": "1.1.32",
"description": "Homebridge plugin supporting various services over MQTT",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit b048d70

Please sign in to comment.