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

Latest version not working #1

Open
The-Weintek-Expert opened this issue Jan 17, 2019 · 1 comment
Open

Latest version not working #1

The-Weintek-Expert opened this issue Jan 17, 2019 · 1 comment

Comments

@The-Weintek-Expert
Copy link

In the latest version this node doesn't seem to work. this line gives an error:

afbeelding
After changing it to :

msg.payload = buffer;

the flow starts working again.

@stu-carter
Copy link

Confirmed the issue and the suggested fix made locally solves it. The alternative is to send a message to this node which has an object as the payload. e.g. using a Paylod of type 'JSON' and setting the value to '{}' or with your own, populated object.

FYI, the issue is that the code tests whether a payload exits and if if it does, the assumption is that the payload is of type 'object'. In my case the payload had a simple string. Attempting to add the 'capturedImg' property to a string or boolean fails as they are not a Javascript Object type.

I think the author is attempting to preserve the inbound message by adding a new property to hold the image. This is probably best handled with an option on the node itself which controls whether the outbound message payload is replaced with the image or the additional 'capturedImg' property is added to it. For the latter, the user would have to ensure that the incoming message had an object as the payload.

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

2 participants