🔧 fix: Potential Null Values for Custom Config

This commit is contained in:
Danny Avila 2025-06-19 22:54:49 -04:00
parent 299c484c7a
commit 97085073d2
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
2 changed files with 3 additions and 4 deletions

View file

@ -29,8 +29,6 @@ router.get('/', async function (req, res) {
return;
}
const config = await getCustomConfig();
const isBirthday = () => {
const today = new Date();
return today.getMonth() === 1 && today.getDate() === 11;
@ -102,7 +100,8 @@ router.get('/', async function (req, res) {
};
payload.mcpServers = {};
if (config.mcpServers) {
const config = await getCustomConfig();
if (config?.mcpServers != null) {
for (const serverName in config.mcpServers) {
const serverConfig = config.mcpServers[serverName];
payload.mcpServers[serverName] = {