FE: cleaner getMac()

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2025-12-23 10:21:49 +11:00
parent aef1f89ca4
commit 9b0c916bba
2 changed files with 60 additions and 55 deletions
+1
View File
@@ -549,6 +549,7 @@ function updateDevicePageName(mac) {
window.onload = function async() window.onload = function async()
{ {
mac = getMac()
// initializeTabs(); // initializeTabs();
updateChevrons(mac); updateChevrons(mac);
updateDevicePageName(mac); updateDevicePageName(mac);
+5 -1
View File
@@ -288,7 +288,11 @@
// Save device data to DB // Save device data to DB
function setDeviceData(direction = '', refreshCallback = '') { function setDeviceData(direction = '', refreshCallback = '') {
// Check MAC // Check MAC
if (mac === '') { mac = getMac()
if (isEmpty(mac)) {
console.error("Mac not defined");
return; return;
} }