From 801af67433ec90dfa3dcd3093f94d2897100d8bc Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 18 Jun 2018 13:49:42 +0200 Subject: [PATCH] Fix stats methods to handle removed cats/things --- public_html/cache.manifest | 2 +- public_html/inc/mysc_objects.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/public_html/cache.manifest b/public_html/cache.manifest index a2f2d9b..5b24735 100644 --- a/public_html/cache.manifest +++ b/public_html/cache.manifest @@ -1,5 +1,5 @@ CACHE MANIFEST -# Date : 2017/09/17 - Version : 2 +# Date : 2018/06/18 - Version : 1 CACHE: index.html diff --git a/public_html/inc/mysc_objects.js b/public_html/inc/mysc_objects.js index ec79ee5..b769f2f 100644 --- a/public_html/inc/mysc_objects.js +++ b/public_html/inc/mysc_objects.js @@ -245,8 +245,14 @@ function SCase(uuid,name,data) { var things=0; var things_done=0; this.cats.each(function(cidx,cat) { + if (cat.removed) { + return true; + } cats++; for (idx in cat.things) { + if (cat.things[idx].removed) { + continue; + } things++; if (cat.things[idx].checked) { things_done++; @@ -472,6 +478,9 @@ function Cat(uuid,name,color,data) { var count=0; var done=0; for (idx in this.things) { + if (this.things[idx].removed) { + continue; + } if (this.things[idx].checked) { done+=1; }