From c3cbbc3f66a08e67ca2c833bb960839daea614b1 Mon Sep 17 00:00:00 2001 From: Tobias Beer Date: Mon, 26 Jan 2015 19:00:49 +0100 Subject: [PATCH] renamed value to items --- core/modules/filters/each.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/core/modules/filters/each.js b/core/modules/filters/each.js index 7458eab2c..b492ed1e1 100644 --- a/core/modules/filters/each.js +++ b/core/modules/filters/each.js @@ -23,18 +23,15 @@ exports.each = function(source,operator,options) { source(function(tiddler,title) { if(tiddler) { var field = operator.operand || "title", - value = list ? + items = list ? options.wiki.getTiddlerList(title,field) : [ "title" === field ? title : tiddler.getFieldString(operator.operand)]; - $tw.utils.each( - value, - function(value){ - if(!$tw.utils.hop(values,value)) { - values[value] = true; - results.push(list ? value : title); - } + $tw.utils.each(items,function(value){ + if(!$tw.utils.hop(values,value)) { + values[value] = true; + results.push(list ? value : title); } - ) + }); } }); return results;