File tree Expand file tree Collapse file tree
OpenFlowNodeRED/src/nodered/nodes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "version" : " 0.2.0" ,
33 "configurations" : [
4- {
5- "type" : " node" ,
6- "request" : " attach" ,
7- "name" : " Attach to 10.0.0.201 (OpenFlow)" ,
8- "address" : " 10.0.0.201" ,
9- "port" : 5858 ,
10- "localRoot" : " ${workspaceFolder}/dist" ,
11- "remoteRoot" : " /data"
12- },
134 {
145 "type" : " node" ,
156 "request" : " attach" ,
Original file line number Diff line number Diff line change @@ -163,12 +163,18 @@ export class workflow_in_node {
163163 if ( ack !== null && ack !== undefined ) ack ( ) ;
164164 return ;
165165 }
166- if ( res [ 0 ] . payload === null || res [ 0 ] . payload === undefined ) {
167- res [ 0 ] . payload = data ;
168- data = res [ 0 ] ;
166+ var orgmsg = res [ 0 ] ;
167+ if ( orgmsg . payload === null || orgmsg . payload === undefined ) {
168+ orgmsg . payload = data ;
169+ data = orgmsg ;
169170 } else {
170- res [ 0 ] . payload = Object . assign ( res [ 0 ] . payload , data ) ;
171- data = res [ 0 ] ;
171+ if ( typeof orgmsg . payload === "object" ) {
172+ orgmsg . payload = Object . assign ( orgmsg . payload , data ) ;
173+ } else {
174+ orgmsg . payload = { message : orgmsg . payload } ;
175+ orgmsg . payload = Object . assign ( orgmsg . payload , data ) ;
176+ }
177+ data = orgmsg ;
172178 }
173179 data . jwt = jwt ;
174180 // console.log(data.payload);
Original file line number Diff line number Diff line change 1- 0.0.516
1+ 0.0.517
You can’t perform that action at this time.
0 commit comments