fixed bug: simplified logic

This commit is contained in:
git 2025-06-16 17:00:11 +01:00
parent 4e30ce31d1
commit f500efa19d

View File

@ -230,9 +230,7 @@ async function fetchRemoteDevicesData() {
db.remote.A[Name] = Data;
}
else if (Type === 'PTR') {
if (!db.remote.PTR[Name]) db.remote.PTR[Name] = [];
if (!db.remote.PTR[Name].includes(Data))
db.remote.PTR[Name].push((["[","{"].includes(Data.substr(0,1))?JSON.parse(Data):Data));
db.remote.PTR[Name] = (["[","{"].includes(Data.substr(0,1))?JSON.parse(Data):Data);
}
else if (['TXT', 'SRV'].includes(Type)) {
if (!db.remote.services[Name]) db.remote.services[Name] = { TXT: null, SRV: null };