From 1194823cd581bc022446e386dc5cfb47186c4f4e Mon Sep 17 00:00:00 2001 From: d00f Date: Tue, 4 Aug 2026 05:43:05 +0200 Subject: [PATCH] system: drop the defensive checks around the System page fields The hostname and model fields were populated through element-existence checks and empty-string fallbacks that the other fields on the page do without. Assign them the same way. Suggested-by: vDorst --- html/system.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/system.js b/html/system.js index a907ecd..0add17f 100644 --- a/html/system.js +++ b/html/system.js @@ -131,8 +131,8 @@ function fetchIP() { document.getElementById("ip").value=s.ip_address; document.getElementById("netmask").value=s.ip_netmask; document.getElementById("gw").value=s.ip_gateway; - if (document.getElementById("hostname")) document.getElementById("hostname").value = s.hostname || ""; - if (document.getElementById("model")) document.getElementById("model").textContent = s.hw_ver || ""; + document.getElementById("hostname").value=s.hostname; + document.getElementById("model").textContent=s.hw_ver; clearInterval(systemInterval); // Fetch and populate the config textbox fetchConfig().then((configText) => {