From 91b5547cdf5c1cd52797bed246a3eb35fbefa65b Mon Sep 17 00:00:00 2001 From: Tobias Beer Date: Thu, 29 Jan 2015 00:45:58 +0100 Subject: [PATCH] adopted style recommendations --- boot/boot.js | 2 +- core/modules/filters/each.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index 68eb80799..56742c89d 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -88,7 +88,7 @@ $tw.utils.each = function(object,callback) { Pushes a value to an array only when not yet contained. */ $tw.utils.pushOnce = function(array,value) { - if(0 > array.indexOf(value)){ + if(array.indexOf(value) == -1) { array.push(value); } } diff --git a/core/modules/filters/each.js b/core/modules/filters/each.js index 8307ee31b..cd7584323 100644 --- a/core/modules/filters/each.js +++ b/core/modules/filters/each.js @@ -20,10 +20,10 @@ exports.each = function(source,operator,options) { var results =[] , value,values = {}, field = operator.operand || "title"; - if("list" !== operator.suffix) { + if(operator.suffix !== "list") { source(function(tiddler,title) { if(tiddler) { - value = "title" === field ? title : tiddler.getFieldString(field); + value = (field === "title") ? title : tiddler.getFieldString(field); if(!$tw.utils.hop(values,value)) { values[value] = true; results.push(title);