mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
fix websocket feedback test - now doesn't spin
This commit is contained in:
5
packages/node_modules/@node-red/nodes/core/io/22-websocket.js
generated
vendored
5
packages/node_modules/@node-red/nodes/core/io/22-websocket.js
generated
vendored
@@ -250,10 +250,11 @@ module.exports = function(RED) {
|
||||
this.on("input", function(msg) {
|
||||
var payload;
|
||||
if (this.serverConfig.wholemsg) {
|
||||
var sess = JSON.stringify(msg._session);
|
||||
var sess;
|
||||
if (msg._session) { sess = JSON.stringify(msg._session); }
|
||||
delete msg._session;
|
||||
payload = JSON.stringify(msg);
|
||||
msg._session = JSON.parse(sess);
|
||||
if (sess) { msg._session = JSON.parse(sess); }
|
||||
}
|
||||
else if (msg.hasOwnProperty("payload")) {
|
||||
if (!Buffer.isBuffer(msg.payload)) { // if it's not a buffer make sure it's a string.
|
||||
|
Reference in New Issue
Block a user