diff options
author | loovjo <jonathan.loov@gmail.com> | 2020-05-08 12:10:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-08 12:10:37 +0200 |
commit | 6c1ab2001984fb3a61a1c575272306b1d8eabd03 (patch) | |
tree | a59d8efb3505915ee80773468f8229819b4b1e7f | |
parent | 297db3fdbd9c9c818d1bf93dc92c7ec036c79e58 (diff) |
Make temporary variable not as temporary
-rw-r--r-- | routes/index.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/index.js b/routes/index.js index bc97e8b..b7e9526 100644 --- a/routes/index.js +++ b/routes/index.js @@ -369,8 +369,9 @@ router.get("/game", checkAuthentication(PAGE_ERROR_OUTPUT), function(req, res, n router.ws("/gameUpdate", checkAuthentication(SOCKET_ERROR_OUTPUT), function(ws, req, next) { console.log("Opening socket."); ws.on("message", function(message) { + var tempCommandList; try { - var tempCommandList = JSON.parse(message); + tempCommandList = JSON.parse(message); } catch (tempErr) { var tempResult = { success: false, |