Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit 716f7bd

Browse files
committed
fix suggestions
1 parent e20820b commit 716f7bd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/account-db.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function bootstrap(password) {
4949
}
5050

5151
export function login(password) {
52-
if (password == null || password === '') {
52+
if (password === undefined || password === '') {
5353
return { error: 'invalid-password' };
5454
}
5555

src/app-account.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ app.post('/login', (req, res) => {
4343
if (error) {
4444
res.status(400).send({ status: 'error', reason: error });
4545
return;
46-
} else {
47-
res.send({ status: 'ok', data: { token } });
4846
}
47+
48+
res.send({ status: 'ok', data: { token } });
4949
});
5050

5151
app.post('/change-password', (req, res) => {

0 commit comments

Comments
 (0)