fix: null-safe input lookup in confirmEditForm
This commit is contained in:
parent
60e05cd8fe
commit
db081b6b04
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue