From 881f56e3e479c630837c84773abbad10e2630243 Mon Sep 17 00:00:00 2001 From: RubenPX Date: Wed, 11 May 2022 10:42:32 +0200 Subject: [PATCH] Fix devices length comparation --- ereuse_devicehub/static/js/main_inventory.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ereuse_devicehub/static/js/main_inventory.js b/ereuse_devicehub/static/js/main_inventory.js index 3d355574..3bae4ce3 100644 --- a/ereuse_devicehub/static/js/main_inventory.js +++ b/ereuse_devicehub/static/js/main_inventory.js @@ -91,10 +91,10 @@ window.addEventListener("DOMContentLoaded", () => { : "Cancel selection" }`; - if (TableController.getAllDevices().length > 0) { - alertInfoDevices.classList.remove("d-none"); - } else { + if (TableController.getSelectedDevices().length <= 0) { alertInfoDevices.classList.add("d-none") + } else { + alertInfoDevices.classList.remove("d-none"); } if (isAllChecked.every(bool => bool == true)) {