cache fixes 🩹

This commit is contained in:
Jokob-sk
2024-03-16 11:24:24 +11:00
parent 7c70d435e4
commit 1fa49a7730
3 changed files with 7 additions and 7 deletions

View File

@@ -845,14 +845,14 @@ function isRandomMAC(mac)
function getDeviceDataByMacAddress(macAddress, dbColumn) {
const sessionDataKey = 'devicesListAll_JSON';
const sessionData = sessionStorage.getItem(sessionDataKey);
const devicesCache = getCache(sessionDataKey);
if (!sessionData || sessionData == "") {
console.log(`Session variable "${sessionDataKey}" not found.`);
if (!devicesCache || devicesCache == "") {
console.error(`Session variable "${sessionDataKey}" not found.`);
return "Unknown";
}
const devices = JSON.parse(sessionData);
const devices = JSON.parse(devicesCache);
for (const device of devices) {
if (device["dev_MAC"].toLowerCase() === macAddress.toLowerCase()) {