From 547ead751930e15f1add35165be33794ad80f769 Mon Sep 17 00:00:00 2001
From: Anu <anulithic@gmail.com>
Date: Sun, 18 Sep 2022 21:12:31 -0700
Subject: [PATCH] Locate tool always shows number of matching slaves

---
 src/js/findSlave.js | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/js/findSlave.js b/src/js/findSlave.js
index 4c8c602e040..0ea81486149 100644
--- a/src/js/findSlave.js
+++ b/src/js/findSlave.js
@@ -71,9 +71,8 @@ App.UI.findSlave = function() {
 	 * @param {DocumentFragment} frag
 	 */
 	function _appendResultList(ids, frag) {
-		if (ids.length === 0) {
-			App.UI.DOM.appendNewElement("p", frag, "No matching slaves.");
-		} else {
+		App.UI.DOM.appendNewElement("p", frag, `${ids.length} matching slave${ids.length === 1 ? `` : `s`}.`);
+		if (ids.length !== 0) {
 			frag.appendChild(App.UI.SlaveList.render(ids, [], App.UI.SlaveList.SlaveInteract.stdInteract));
 		}
 	}
-- 
GitLab