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
This commit is contained in:
d00f
2026-08-04 05:43:05 +02:00
parent 94716ceb5d
commit 1194823cd5
+2 -2
View File
@@ -131,8 +131,8 @@ function fetchIP() {
document.getElementById("ip").value=s.ip_address; document.getElementById("ip").value=s.ip_address;
document.getElementById("netmask").value=s.ip_netmask; document.getElementById("netmask").value=s.ip_netmask;
document.getElementById("gw").value=s.ip_gateway; document.getElementById("gw").value=s.ip_gateway;
if (document.getElementById("hostname")) document.getElementById("hostname").value = s.hostname || ""; document.getElementById("hostname").value=s.hostname;
if (document.getElementById("model")) document.getElementById("model").textContent = s.hw_ver || ""; document.getElementById("model").textContent=s.hw_ver;
clearInterval(systemInterval); clearInterval(systemInterval);
// Fetch and populate the config textbox // Fetch and populate the config textbox
fetchConfig().then((configText) => { fetchConfig().then((configText) => {