From: Steinar H. Gunderson Date: Wed, 26 Jul 2023 12:01:47 +0000 (+0200) Subject: Callahans were not properly filtered; fix. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=9a57e555972a2acc5cbd60c17154c602c9a883c0;p=pkanalytics Callahans were not properly filtered; fix. --- diff --git a/ultimate.js b/ultimate.js index d50429e..e9b0d80 100644 --- a/ultimate.js +++ b/ultimate.js @@ -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) {