Skip to content

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

@kenfehling

Description

@kenfehling

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions