mqtt-exec
mqtt-exec copied to clipboard
TypeError: Object true has no method 'replace'
Hi, thanks for this library.
Trying the example, when I run mosquitto_pub
I get:
/usr/local/lib/node_modules/mqtt-exec/mqtt-exec.js:59
var message = message.replace(/"/g, "\\\"");
^
TypeError: Object true has no method 'replace'
It looks like the message "true" becomes a buffer object and not a string. (<Buffer 74 72 75 65>
)
This patch fixes this issue for me: https://github.com/denschu/mqtt-exec/pull/4