Missing await for async calls to client.login(...) and updateChecker(...) in main.js
While analyzing the main.js using a static analysis tool, I noticed that two asynchronous function calls are made without proper handling:
Instances:
Line 280 – updateChecker()
Line 296 – client.login(client.configs.token)
Both of these functions are async and internally handle their own errors using try-catch, which is good. However, the calls to them are currently not awaited, which can cause:
- Unhandled rejections to go unnoticed in some environments.
- Execution to proceed before these critical operations (like login or update check) are complete.
- ESLint violations (e.g., @typescript-eslint/no-floating-promises).
0 条评论