Skip to content

Commit

Permalink
fix: checkForEmptyUsers error correction;
Browse files Browse the repository at this point in the history
  • Loading branch information
ncoonrod committed Mar 17, 2024
1 parent 22f6cd6 commit 3419c95
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,9 @@ export class User implements IUser
{
let results: MySQLResults = await db.queryOne (`select COUNT(*) from users;`);

if (results.error != null)
throw new Error (results.error);

if (results.results["COUNT(*)"] < 1)
return (true);

Expand Down

0 comments on commit 3419c95

Please sign in to comment.