diff --git a/src/index.ts b/src/index.ts index fc97ea8..6e08ff4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -118,7 +118,7 @@ async function updateInstances(): Promise { const existingInstance = instanceNames.get(instance.name); if (existingInstance) { for (const key of Object.keys(instance)) { - if (!existingInstance[key]) { + if (!(key in existingInstance)) { existingInstance[key] = instance[key]; } } diff --git a/src/webpage/instances.json b/src/webpage/instances.json index 4949fbc..2b512ab 100644 --- a/src/webpage/instances.json +++ b/src/webpage/instances.json @@ -1,34 +1,34 @@ [ - { - "name": "Spacebar", - "description": "The official Spacebar instance.", - "image": "https://raw.githubusercontent.com/spacebarchat/spacebarchat/master/branding/png/Spacebar__Icon-Discord.png", - "urls":{ - "wellknown": "https://spacebar.chat/", - "api": "https://old.server.spacebar.chat/api", - "cdn": "https://cdn.old.server.spacebar.chat", - "gateway": "wss://gateway.old.server.spacebar.chat" - }, - "url": "https://spacebar.chat" - }, - { - "name": "Fastbar", - "description": "The best Spacebar instance with 95% uptime, running under on a NVME drive running with bleeding edge stuff <3", - "image": "https://spacebar.greysilly7.xyz/logo.png", - "url": "https://greysilly7.xyz", - "language": "en", - "country": "US", - "display": true, - "urls": { - "wellknown": "https://greysilly7.xyz", - "api": "https://api-spacebar.greysilly7.xyz/api", - "cdn": "https://cdn-spacebar.greysilly7.xyz", - "gateway": "wss://gateway-spacebar.greysilly7.xyz" - }, - "contactInfo": { - "dicord": "greysilly7", - "github": "https://github.com/greysilly7", - "email": "greysilly7@gmail.com" - } - } + { + "name": "Spacebar", + "description": "The official Spacebar instance.", + "image": "https://raw.githubusercontent.com/spacebarchat/spacebarchat/master/branding/png/Spacebar__Icon-Discord.png", + "urls": { + "wellknown": "https://spacebar.chat/", + "api": "https://old.server.spacebar.chat/api", + "cdn": "https://cdn.old.server.spacebar.chat", + "gateway": "wss://gateway.old.server.spacebar.chat" + }, + "url": "https://spacebar.chat" + }, + { + "name": "Fastbar", + "description": "The best Spacebar instance with 95% uptime, running under on a NVME drive running with bleeding edge stuff <3", + "image": "https://spacebar.greysilly7.xyz/logo.png", + "url": "https://greysilly7.xyz", + "language": "en", + "country": "US", + "display": true, + "urls": { + "wellknown": "https://greysilly7.xyz", + "api": "https://api-spacebar.greysilly7.xyz/api", + "cdn": "https://cdn-spacebar.greysilly7.xyz", + "gateway": "wss://gateway-spacebar.greysilly7.xyz" + }, + "contactInfo": { + "dicord": "greysilly7", + "github": "https://github.com/greysilly7", + "email": "greysilly7@gmail.com" + } + } ]