]> git.cworth.org Git - empires-server/commitdiff
Fix admin interface to work once again
authorCarl Worth <cworth@cworth.org>
Sat, 6 Jun 2020 12:10:36 +0000 (05:10 -0700)
committerCarl Worth <cworth@cworth.org>
Sat, 6 Jun 2020 12:10:36 +0000 (05:10 -0700)
This has been broken since commit 4c810ccb16ea6cfcdcb7f507aea2affc2c36f163
where we renamed "clients" to "players" but missed this reference.

How I miss static checking for things like this...

lmno.js

diff --git a/lmno.js b/lmno.js
index b85041ec74d13be48abcbca9a5f7e3e8b900ba4e..db0d35b9cc3a55fef821f1b1d2f75a5c9aee868d 100644 (file)
--- a/lmno.js
+++ b/lmno.js
@@ -267,7 +267,7 @@ app.get('/admin/', auth_admin, (request, response) => {
   let idle = [];
 
   for (let id in lmno.games) {
-    if (lmno.games[id].clients.length)
+    if (lmno.games[id].players.length)
       active.push(lmno.games[id]);
     else
       idle.push(lmno.games[id]);