Browse Source

Show minutes if no hours on uptime filter

pm2
Luke Childs 8 years ago
parent
commit
d3e0ca3679
  1. 2
      lib/nunjuck-filters.js

2
lib/nunjuck-filters.js

@ -28,7 +28,7 @@ const filters = {
let readableUptime = '';
readableUptime += uptime.d ? ` ${uptime.d}d` : '';
readableUptime += uptime.h ? ` ${uptime.h}h` : '';
readableUptime += !uptime.d && uptime.m ? ` ${uptime.m}m` : '';
readableUptime += !uptime.d || !uptime.h && uptime.m ? ` ${uptime.m}m` : '';
return readableUptime.trim();
},

Loading…
Cancel
Save