From f9464dfaf8151adfff3c028182236340fe267ce0 Mon Sep 17 00:00:00 2001 From: Tobias Beer Date: Mon, 26 Jan 2015 18:58:08 +0100 Subject: [PATCH] using variable declaration for readability --- core/modules/filters/each.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/modules/filters/each.js b/core/modules/filters/each.js index 8126d5821..7458eab2c 100644 --- a/core/modules/filters/each.js +++ b/core/modules/filters/each.js @@ -22,12 +22,12 @@ exports.each = function(source,operator,options) { list = "list" === operator.suffix; source(function(tiddler,title) { if(tiddler) { - var value, - field = operator.operand || "title"; + var field = operator.operand || "title", + value = list ? + options.wiki.getTiddlerList(title,field) : + [ "title" === field ? title : tiddler.getFieldString(operator.operand)]; $tw.utils.each( - list ? - options.wiki.getTiddlerList(title,field) : - [ "title" === field ? title : tiddler.getFieldString(operator.operand)], + value, function(value){ if(!$tw.utils.hop(values,value)) { values[value] = true;