From 3bab15c51acc37f065bcf7b14daa10287247b118 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Wed, 20 Nov 2013 16:50:37 +0000 Subject: [PATCH] Simplify plural code. --- tools/htdocs/mkws.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 3769422..a369f2d 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -569,10 +569,8 @@ function renderDetails(data, marker) details += renderField("Subject", data["location"][0]["md-subject"]); if (locations.length == 0) { details += 'No locations for record!'; - } else if (locations.length == 1) { - details += renderField("Location", locations); } else { - details += renderField("Locations", locations); + details += renderField("Location" + (locations.length == 1 ? "" : "s"), locations); } details += ''; -- 1.7.10.4