mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-20 00:30:43 +00:00
Joining an empty list should return an empty list (#4853)
This commit is contained in:
@@ -90,6 +90,9 @@ function makeStringReducingOperator(fnCalc,initialValue) {
|
||||
source(function(tiddler,title) {
|
||||
result.push(title);
|
||||
});
|
||||
if(result.length === 0) {
|
||||
return [];
|
||||
}
|
||||
return [result.reduce(function(accumulator,currentValue) {
|
||||
return fnCalc(accumulator,currentValue,operator.operand || "");
|
||||
},initialValue) || ""];
|
||||
|
||||
Reference in New Issue
Block a user