let join also accumulate strings (and not fail)

This commit is contained in:
Dave Conway-Jones
2017-06-15 00:11:35 +01:00
parent 2b2136c468
commit 56405ac903
3 changed files with 28 additions and 3 deletions

View File

@@ -239,6 +239,9 @@
var val = $(this).val();
$(".node-row-custom").toggle(val==='custom');
$(".form-tips-auto").toggle(val==='auto');
if (val === "auto") {
$("#node-input-accumulate").attr('checked', false);
}
});
$("#node-input-build").change(function(e) {

View File

@@ -354,9 +354,12 @@ module.exports = function(RED) {
currentCount:0,
payload:{},
targetCount:targetCount,
type:"object",
type:payloadType,
msg:msg
}
if (payloadType === 'string') {
inflight[partId].payload = [];
}
}
else {
inflight[partId] = {
@@ -364,7 +367,6 @@ module.exports = function(RED) {
payload:[],
targetCount:targetCount,
type:payloadType,
joinChar: joinChar,
msg:msg
};
if (payloadType === 'string') {
@@ -374,7 +376,6 @@ module.exports = function(RED) {
} else if (payloadType === 'buffer') {
inflight[partId].bufferLen = 0;
}
}
if (node.timer > 0) {
inflight[partId].timeout = setTimeout(function() {