Skip to content

Commit 067947a

Browse files
authored
Merge pull request #5 from Rallymen007/backwards_compatibility
backwards compatibility with pre 1.0 node-red
2 parents b35a012 + 5c3e5a3 commit 067947a

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

simple-soap.js

+14-4
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ module.exports = function (RED) {
8181
if (err) {
8282
node.error(err, msg);
8383
node.status({ fill: "red", shape: "ring", text: err.code });
84-
nodeDone();
84+
if(nodeDone){
85+
nodeDone();
86+
}
8587
}
8688
else {
8789

@@ -110,13 +112,21 @@ module.exports = function (RED) {
110112
if (parseErr) {
111113
node.error(parseErr, msg);
112114
node.status({ fill: "red", shape: "ring", text: parseErr });
113-
nodeDone();
115+
if(nodeDone){
116+
nodeDone();
117+
}
114118
}
115119
else {
116120
msg.payload = parseResult;
117121
node.status({});
118-
nodeSend(msg);
119-
nodeDone();
122+
if(nodeSend){
123+
nodeSend(msg);
124+
} else {
125+
node.send(msg);
126+
}
127+
if(nodeDone){
128+
nodeDone();
129+
}
120130
}
121131
});
122132

0 commit comments

Comments
 (0)