From ed731f087fe064d03fa903f289d0f6a7a6141b15 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Wed, 8 Jul 2015 15:43:58 +0200 Subject: [PATCH] proporties: refactor if to ternary --- lib/proportions.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/proportions.js b/lib/proportions.js index b30f206..329675d 100644 --- a/lib/proportions.js +++ b/lib/proportions.js @@ -119,10 +119,7 @@ define(["chroma-js", "virtual-dom", "numeral-intl"], var fwDict = count(nodes, ["nodeinfo", "software", "firmware", "release"]) var hwDict = count(nodes, ["nodeinfo", "hardware", "model"]) var geoDict = count(nodes, ["nodeinfo", "location"], function (d) { - if (d) - return "ja" - else - return "nein" + return d ? "ja" : "nein" }) var autoDict = count(nodes, ["nodeinfo", "software", "autoupdater"], function (d) { if (d === null)