Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

fix: guard the footer arrow-key focus against an undefined target

aashu3f8659c04060
diff --git a/packages/react/src/Modal.tsx b/packages/react/src/Modal.tsx
index 5a8089b106..60cac42faa 100644
--- a/packages/react/src/Modal.tsx
+++ b/packages/react/src/Modal.tsx
@@ -75,7 +75,7 @@ function moveBetweenFooterActions(event: KeyboardEvent<HTMLDivElement>) {
if (index === -1) return;
event.preventDefault();
const step = event.key === "ArrowRight" ? 1 : -1;
- actions[(index + step + actions.length) % actions.length].focus();
+ actions[(index + step + actions.length) % actions.length]?.focus();
}
const ModalContentVariants = cva(