diff --git a/serve.js b/serve.js index 231780bb..a4836ee2 100644 --- a/serve.js +++ b/serve.js @@ -194,7 +194,7 @@ app.post('/pdf', async (req, res) => { }); app.get('/', async (req, res) => { - if(typeof(req.session) != "undefined") { + if (req.session.username) { res.redirect('/home.html'); } else { res.redirect('/login.html');