From 7f259242061f4f75a4e3bfa3c41882210b9f6b68 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sat, 11 Jan 2025 01:13:26 -0700 Subject: [PATCH] AAAA --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 7f08f34..bbde810 100644 --- a/index.js +++ b/index.js @@ -105,8 +105,8 @@ async function checkForNewEndpoints() { let newContacts = []; for (const endpoint of parsed) { const seen = await db.getObjectDefault(`/seen/${endpoint.endpoint}`, []); - const newEndpointContacts = endpoint.contacts.filter(contact => !seen.includes(contact.host.split(":")[0])); - const uniqueHosts = [...new Set(newEndpointContacts.map(contact => contact.host.split(":")[0]))]; + const newEndpointContacts = endpoint.contacts.filter(contact => !seen.includes(contact.host?.split(":")[0])); + const uniqueHosts = [...new Set(newEndpointContacts.map(contact => contact.host?.split(":")[0]))]; uniqueHosts.forEach(host => { db.push(`/seen/${endpoint.endpoint}[]`, host); });