Skip to content

Commit 18c107a

Browse files
committed
don't add id on empty payload
1 parent 7b70568 commit 18c107a

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

OpenFlowNodeRED/src/nodered/nodes/workflow_nodes.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,13 @@ export class workflow_in_node {
185185
// Logger.instanse.info("workflow in activated creating a new workflow instance with id " + res2._id);
186186
// OpenFlow Controller.ts needs the id, when creating a new intance !
187187
data._id = res2._id;
188-
data.payload._id = res2._id;
188+
if (data.payload !== null || data.payload != undefined) {
189+
try {
190+
data.payload._id = res2._id;
191+
} catch (error) {
192+
Logger.instanse.warn(error);
193+
}
194+
}
189195
// result = this.nestedassign(res2, result);
190196
data = Object.assign(res2, data);
191197
}

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.491
1+
0.0.492

0 commit comments

Comments
 (0)