@dcrackel/hematournamentui 1.0.506 → 1.0.507

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.
@@ -34379,7 +34379,7 @@ const lz = /* @__PURE__ */ se(oz, [["render", az]]), cz = {
34379
34379
  return this.fencer1 ? this.hostingClubColors.Color1.toLowerCase() : this.hostingClubColors.Color2.toLowerCase();
34380
34380
  },
34381
34381
  countYellowCards() {
34382
- return this.fencer1 ? this.bout.Person1.Penalties.filter((t) => t.PenaltyType === "Yellow").length : this.bout.Person2.Penalties.filter((t) => t.PenaltyType === "Yellow").length;
34382
+ return this.fencer1 && this.bout.Person1 && Array.isArray(this.bout.Person1.Penalties) ? this.bout.Person1.Penalties.filter((t) => t.PenaltyType === "Yellow").length : this.bout.Person2 && Array.isArray(this.bout.Person2.Penalties) ? this.bout.Person2.Penalties.filter((t) => t.PenaltyType === "Yellow").length : 0;
34383
34383
  },
34384
34384
  countRedCards() {
34385
34385
  return this.fencer1 ? this.bout.Person1.Penalties.filter((t) => t.PenaltyType === "Red").length : this.bout.Person2.Penalties.filter((t) => t.PenaltyType === "Red").length;
@@ -34848,6 +34848,7 @@ const Gz = /* @__PURE__ */ se(Rz, [["render", Uz]]), Jz = {
34848
34848
  },
34849
34849
  addNewPenalty() {
34850
34850
  const t = {
34851
+ BoutId: this.bout.BoutId,
34851
34852
  PenaltyId: Date.now(),
34852
34853
  PenaltyType: this.getToggled(),
34853
34854
  Notes: this.currentNote