Skip to content

Commit

Permalink
Update packages/remix-react/components.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: Matt Brophy <[email protected]>
  • Loading branch information
ryanflorence and brophdawg11 committed Aug 10, 2023
1 parent 9da3509 commit 9d7c065
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/remix-react/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,8 @@ export function Meta() {
let meta: MetaDescriptor[] = [];
let leafMeta: MetaDescriptor[] | null = null;
let matches: MetaMatches = [];
let error = errors ? Object.values(errors)[0] : null;
let errorMatch = matches.find((m) => errors && errors[m.id] != null);
let error = errors && errorMatch ? errors[errorMatch.id] : null;
for (let i = 0; i < _matches.length; i++) {
let _match = _matches[i];
let routeId = _match.route.id;
Expand Down

0 comments on commit 9d7c065

Please sign in to comment.