From 4d72448cf38dca0cf5f372ea39355785f32bf2a7 Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Thu, 13 Jul 2023 02:13:50 -0600 Subject: [PATCH] fix: remove one-time variable --- backend/app.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/app.ts b/backend/app.ts index 0fde59b..6dc40f4 100644 --- a/backend/app.ts +++ b/backend/app.ts @@ -56,9 +56,8 @@ async function main() { } // Attempt to load user configuration - const readUserConfig = (): Promise => new Promise((resolve) => - UserConfig.readConfigFile().then(() => resolve(void 0)).catch((err) => (err.code && err.code === 'ENOENT' ? {} : console.error(err), resolve(void 0)))); - await readUserConfig(); + await new Promise((resolve) => UserConfig.readConfigFile().then(() => resolve(void 0)) + .catch((err) => (err.code && err.code === 'ENOENT' ? {} : console.error(err), resolve(void 0)))); // Set up Express const app = express();