From 51dc768d9daa7216fede2ac7eb9bfd4643d77a52 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 7 Jul 2021 16:29:19 +0200 Subject: Add missing 'return' statement. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server.js') diff --git a/server.js b/server.js index 6d036e7..49a97d0 100644 --- a/server.js +++ b/server.js @@ -944,7 +944,7 @@ app.get('/play/:game_id', must_be_logged_in, function (req, res) { return res.redirect('/join/'+game_id); let role = QUERY_ROLE_FROM_GAME_AND_USER.get(game_id, user_id); if (!role) - res.redirect('/'+title+'/play.html?game='+game_id+'&role=Observer'); + return res.redirect('/'+title+'/play.html?game='+game_id+'&role=Observer'); return res.redirect('/'+title+'/play.html?game='+game_id+'&role='+role); } catch (err) { req.flash('message', err.toString()); -- cgit v1.2.3