Skip to content

Commit

Permalink
fix: include quotes in invariant error message (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkLyck authored Nov 17, 2022
1 parent 0bacb29 commit d480569
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/react-router/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -391,15 +391,15 @@ export function createReactRouter<

invariant(
runtimeMatch.routeId == match?.routeId,
`useMatch('${
`useMatch("${
match?.routeId as string
}') is being called in a component that is meant to render the '${
}") is being called in a component that is meant to render the '${
runtimeMatch.routeId
}' route. Did you mean to 'useMatch(${
}' route. Did you mean to 'useMatch("${
match?.routeId as string
}, { strict: false })' or 'useRoute(${
}", { strict: false })' or 'useRoute("${
match?.routeId as string
})' instead?`,
}")' instead?`,
)
}

Expand Down

0 comments on commit d480569

Please sign in to comment.