diff --git a/.changeset/calm-insects-obey.md b/.changeset/calm-insects-obey.md new file mode 100644 index 0000000000..df682c66fb --- /dev/null +++ b/.changeset/calm-insects-obey.md @@ -0,0 +1,5 @@ +--- +"react-router": patch +--- + +fix: make hasErrorelement optional on types diff --git a/packages/react-router/lib/context.ts b/packages/react-router/lib/context.ts index 55e998604d..af7182557d 100644 --- a/packages/react-router/lib/context.ts +++ b/packages/react-router/lib/context.ts @@ -20,7 +20,7 @@ export interface IndexRouteObject { id?: AgnosticIndexRouteObject["id"]; loader?: AgnosticIndexRouteObject["loader"]; action?: AgnosticIndexRouteObject["action"]; - hasErrorBoundary: AgnosticIndexRouteObject["hasErrorBoundary"]; + hasErrorBoundary?: AgnosticIndexRouteObject["hasErrorBoundary"]; shouldRevalidate?: AgnosticIndexRouteObject["shouldRevalidate"]; handle?: AgnosticIndexRouteObject["handle"]; index: true; @@ -35,7 +35,7 @@ export interface NonIndexRouteObject { id?: AgnosticNonIndexRouteObject["id"]; loader?: AgnosticNonIndexRouteObject["loader"]; action?: AgnosticNonIndexRouteObject["action"]; - hasErrorBoundary: AgnosticNonIndexRouteObject["hasErrorBoundary"]; + hasErrorBoundary?: AgnosticNonIndexRouteObject["hasErrorBoundary"]; shouldRevalidate?: AgnosticNonIndexRouteObject["shouldRevalidate"]; handle?: AgnosticNonIndexRouteObject["handle"]; index?: false;