diff --git a/web/app.js b/web/app.js index bf689bc..ef27c76 100644 --- a/web/app.js +++ b/web/app.js @@ -204,7 +204,9 @@ function hideEditForm(cell) { function confirmEditForm(cell) { var mac = cell.dataset.mac; var ip = cell.dataset.ip; - var hostname = cell.querySelector('.edit-hostname').value.trim(); + var input = cell.querySelector('.edit-hostname'); + if (!input) return; + var hostname = input.value.trim(); hideEditForm(cell); updateHostname(mac, ip, hostname); }