@the-portland-company/shell 0.73.1 → 0.73.2

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.
@@ -1638,8 +1638,9 @@ function SpecOverlayAction({ orgId, orgName } = {}) {
1638
1638
  };
1639
1639
  }, [open, status && status.matched ? status.target_id : null]);
1640
1640
  if (automated || !access?.allowed) return null;
1641
- const badgeLabel = status && status.matched ? `${Math.round(status.mismatch_pct)}%` : status ? "\u2014" : void 0;
1642
- const badgeTone = status && status.matched ? status.passed ? "default" : "danger" : "default";
1641
+ const hasScore = status && status.matched && typeof status.mismatch_pct === "number";
1642
+ const badgeLabel = hasScore ? `${Math.round(status.mismatch_pct)}%` : status ? "\u2014" : void 0;
1643
+ const badgeTone = hasScore ? status && status.matched && status.passed ? "default" : "danger" : "default";
1643
1644
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1644
1645
  /* @__PURE__ */ jsxRuntime.jsxs(
1645
1646
  "button",
@@ -1656,7 +1657,7 @@ function SpecOverlayAction({ orgId, orgName } = {}) {
1656
1657
  {
1657
1658
  className: [
1658
1659
  "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] font-normal leading-none text-[#FFFFFF]",
1659
- status && status.matched ? status.passed ? "bg-[color:var(--chrome-success,#2f855a)]" : "bg-[color:var(--chrome-danger)]" : "bg-[color:var(--muted)]"
1660
+ hasScore ? status && status.matched && status.passed ? "bg-[color:var(--chrome-success,#2f855a)]" : "bg-[color:var(--chrome-danger)]" : "bg-[color:var(--muted)]"
1660
1661
  ].join(" "),
1661
1662
  children: badgeLabel
1662
1663
  }