From 60e05cd8fe841710f9b6a789134810b0f7b14eaf Mon Sep 17 00:00:00 2001 From: cclohmar Date: Wed, 29 Jul 2026 09:33:35 +0000 Subject: [PATCH] fix: guard null selectors in showEditForm when button type varies --- web/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/app.js b/web/app.js index bd4ed2f..bf689bc 100644 --- a/web/app.js +++ b/web/app.js @@ -183,8 +183,10 @@ function reloadDnsmasq() { // --------------------------------------------------------------------------- function showEditForm(cell) { - cell.querySelector('.edit-btn').style.display = 'none'; - cell.querySelector('.pin-needs-name').style.display = 'none'; + var editBtn = cell.querySelector('.edit-btn'); + var pinBtn = cell.querySelector('.pin-needs-name'); + if (editBtn) editBtn.style.display = 'none'; + if (pinBtn) pinBtn.style.display = 'none'; cell.querySelector('.edit-form').style.display = 'inline-flex'; var input = cell.querySelector('.edit-hostname'); input.focus();