join node - honour 3.x behaviour for old instances.

but don't use msg.parts for new instances in manual join mode unless set.
This commit is contained in:
Dave Conway-Jones 2024-06-25 12:57:09 +01:00
parent 1a8b37b4e3
commit 53d8b97fff
No known key found for this signature in database
GPG Key ID: 1DDB0E91A28C2643
2 changed files with 8 additions and 1 deletions

View File

@ -266,6 +266,12 @@
}, },
oneditprepare: function() { oneditprepare: function() {
var node = this; var node = this;
$("#node-input-useparts").on("change", function(e) {
if (node.useparts === undefined) {
node.useparts = true;
$("#node-input-useparts").attr('checked', true);
}
});
$("#node-input-mode").on("change", function(e) { $("#node-input-mode").on("change", function(e) {
var val = $(this).val(); var val = $(this).val();

View File

@ -444,7 +444,8 @@ module.exports = function(RED) {
this.count = Number(n.count || 0); this.count = Number(n.count || 0);
this.joiner = n.joiner||""; this.joiner = n.joiner||"";
this.joinerType = n.joinerType||"str"; this.joinerType = n.joinerType||"str";
this.useparts = n.useparts || false; if (n.useparts === undefined) { this.useparts = true; }
else { this.useparts = n.useparts || false; }
this.reduce = (this.mode === "reduce"); this.reduce = (this.mode === "reduce");
if (this.reduce) { if (this.reduce) {