We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce4b0b0 commit 1fb4f44Copy full SHA for 1fb4f44
1 file changed
pcap.js
@@ -35,7 +35,7 @@ module.exports = function(RED) {
35
msg.payload = raw_packet;
36
} else {
37
var decoded = pcap.decode.packet(raw_packet);
38
-
+
39
if (node.path) {
40
var pathParts = node.path.split(".");
41
pathParts.reduce(function(obj, i) {
@@ -47,7 +47,10 @@ module.exports = function(RED) {
47
if (node.output == "object") {
48
msg.payload = decoded;
49
} else if (node.output == "string") {
50
- msg.payload = String(decoded)
+ msg.payload = '';
51
+ if (decoded.payload !== null) {
52
+ msg.payload = String(decoded);
53
+ }
54
}
55
56
msg.topic = node.ifname;
0 commit comments