@courthive/scoring-visualizations 0.2.17 → 0.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -126,7 +126,7 @@ function M(e) {
126
126
  }
127
127
  function N(e, t) {
128
128
  let n = e?.score?.sets;
129
- if (!(!Array.isArray(n) || !n[t])) return n[t].winningSide;
129
+ if (Array.isArray(n) && n[t]) return n[t].winningSide;
130
130
  }
131
131
  function P(e, t) {
132
132
  let n = e?.score?.sets;
@@ -997,7 +997,7 @@ function Oe() {
997
997
  });
998
998
  for (let e = 0; e < n.length; e++) {
999
999
  let i = n[e - 1], o = "L" + (e == 0 || i.game.complete ? r([0, 0]) : r(i.point.points)) + "x" + r(n[e].point.points);
1000
- t.points.highlight.length && !t.points.highlight.includes(e) || (a.p[o] = a.p[o] ? a.p[o] + 1 : 1, t.points.winners.includes(n[e].point.result) ? a.w[o] = a.w[o] ? a.w[o] + 1 : 1 : t.points.errors.includes(n[e].point.result) && (a.e[o] = a.e[o] ? a.e[o] + 1 : 1));
1000
+ (!t.points.highlight.length || t.points.highlight.includes(e)) && (a.p[o] = a.p[o] ? a.p[o] + 1 : 1, t.points.winners.includes(n[e].point.result) ? a.w[o] = a.w[o] ? a.w[o] + 1 : 1 : t.points.errors.includes(n[e].point.result) && (a.e[o] = a.e[o] ? a.e[o] + 1 : 1));
1001
1001
  }
1002
1002
  if (n.length > 0) {
1003
1003
  let e = n[n.length - 1];