Skip to content

Commit 78454af

Browse files
Make extractPassthroughProps more resilient
Changed from blacklist approach (excluding multiple specific properties) to only excluding payload. This makes the function more resilient to: - Future Node-RED properties (will automatically pass through) - Standard Node-RED properties like topic, _msgid (now preserved) - Custom user properties (all preserved except payload) The output message explicitly sets workflowId and payload, so those values are always controlled regardless of what comes through in passthrough props. This approach is simpler, more maintainable, and prevents future issues if Node-RED adds new internal properties. All 168 tests passing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent a183975 commit 78454af

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

nodes/workflow-monitor.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ module.exports = function (RED) {
6565
return RED.util.evaluateNodeProperty(p, t, node, msg);
6666
};
6767

68-
// Helper to extract passthrough properties from message (excludes standard Node-RED properties)
68+
// Helper to extract passthrough properties from message (excludes only payload to prevent memory leaks)
69+
// Standard Node-RED properties like topic, _msgid pass through
70+
// Output-specific properties like workflowId are explicitly set in output message
6971
const extractPassthroughProps = (msg) => {
70-
const { payload, topic, _msgid, workflowId, workspaceId, ...passthrough } = msg;
72+
const { payload, ...passthrough } = msg;
7173
return passthrough;
7274
};
7375

0 commit comments

Comments
 (0)