fixed bug: simplified logic
This commit is contained in:
parent
4e30ce31d1
commit
f500efa19d
4
main.js
4
main.js
@ -230,9 +230,7 @@ async function fetchRemoteDevicesData() {
|
|||||||
db.remote.A[Name] = Data;
|
db.remote.A[Name] = Data;
|
||||||
}
|
}
|
||||||
else if (Type === 'PTR') {
|
else if (Type === 'PTR') {
|
||||||
if (!db.remote.PTR[Name]) db.remote.PTR[Name] = [];
|
db.remote.PTR[Name] = (["[","{"].includes(Data.substr(0,1))?JSON.parse(Data):Data);
|
||||||
if (!db.remote.PTR[Name].includes(Data))
|
|
||||||
db.remote.PTR[Name].push((["[","{"].includes(Data.substr(0,1))?JSON.parse(Data):Data));
|
|
||||||
}
|
}
|
||||||
else if (['TXT', 'SRV'].includes(Type)) {
|
else if (['TXT', 'SRV'].includes(Type)) {
|
||||||
if (!db.remote.services[Name]) db.remote.services[Name] = { TXT: null, SRV: null };
|
if (!db.remote.services[Name]) db.remote.services[Name] = { TXT: null, SRV: null };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user