summaryrefslogtreecommitdiff
path: root/database/users.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--database/users.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/database/users.js b/database/users.js
index cc50bdc..353b54a 100644
--- a/database/users.js
+++ b/database/users.js
@@ -34,6 +34,9 @@ export async function login(username, password) {
console.log(err);
return null;
}
+ if (user === undefined) {
+ return null;
+ }
const result = await bcrypt.compare(password, user.hash);
if (result === true) {
return {