]> git.sesse.net Git - pkanalytics/commitdiff
Callahans were not properly filtered; fix.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 26 Jul 2023 12:01:47 +0000 (14:01 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 26 Jul 2023 12:01:47 +0000 (14:01 +0200)
ultimate.js

index d50429e3d9509a96adaabf2fc72fc9f9d73d85d2..e9b0d801db0490bd13df4f3c484c553aa44f2e27 100644 (file)
@@ -516,8 +516,10 @@ function calc_stats(json, filters) {
                                // _not_ after an interception, or a self-pass that's not a goal.
                                // (It must mean we tipped off someone.) We'll count it as a regular one
                                // for the time being, although it will make hockey assists weird.
-                               ++p.goals;
-                               ++p.callahans;
+                               if (keep) {
+                                       ++p.goals;
+                                       ++p.callahans;
+                               }
                                handler = prev_handler = null;
                        } else if (type === 'catch' || type === 'goal') {
                                if (handler !== null) {