]> git.cworth.org Git - empires-server/blobdiff - lmno.js
Refactor admin page a bit
[empires-server] / lmno.js
diff --git a/lmno.js b/lmno.js
index 0db678957f0d0e09717fd9e6257d5c3d57189dff..569d33d620244371488a64bcdca10b8804602b72 100644 (file)
--- a/lmno.js
+++ b/lmno.js
@@ -59,14 +59,21 @@ njx.addFilter('active', function(list) {
   if (list)
     return list.filter(e => e.active === true);
   else
-    return null;
+    return [];
 });
 
 njx.addFilter('idle', function(list) {
   if (list)
     return list.filter(e => e.active === false);
   else
-    return null;
+    return [];
+});
+
+njx.addFilter('map_prop', function(list, prop) {
+  if (list)
+    return list.map(e => e[prop]);
+  else
+    return [];
 });
 
 /* Load each of our game mini-apps.