X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=lmno.js;h=569d33d620244371488a64bcdca10b8804602b72;hb=bf51534cfe9f8f1d90fd6df4ae590fdecdc2825e;hp=0db678957f0d0e09717fd9e6257d5c3d57189dff;hpb=3586642fb026f5caa5da24ec8a68862509f0d4d1;p=empires-server diff --git a/lmno.js b/lmno.js index 0db6789..569d33d 100644 --- 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.