Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Object true has no method 'replace' #2

Open
kenfehling opened this issue May 1, 2016 · 1 comment
Open

TypeError: Object true has no method 'replace' #2

kenfehling opened this issue May 1, 2016 · 1 comment

Comments

@kenfehling
Copy link

kenfehling commented May 1, 2016

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>)

@kenfehling
Copy link
Author

This patch fixes this issue for me: #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant