Skip to content

Commit d480569

Browse files
authored
fix: include quotes in invariant error message (#369)
1 parent 0bacb29 commit d480569

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/react-router/src/index.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -391,15 +391,15 @@ export function createReactRouter<
391391

392392
invariant(
393393
runtimeMatch.routeId == match?.routeId,
394-
`useMatch('${
394+
`useMatch("${
395395
match?.routeId as string
396-
}') is being called in a component that is meant to render the '${
396+
}") is being called in a component that is meant to render the '${
397397
runtimeMatch.routeId
398-
}' route. Did you mean to 'useMatch(${
398+
}' route. Did you mean to 'useMatch("${
399399
match?.routeId as string
400-
}, { strict: false })' or 'useRoute(${
400+
}", { strict: false })' or 'useRoute("${
401401
match?.routeId as string
402-
})' instead?`,
402+
}")' instead?`,
403403
)
404404
}
405405

0 commit comments

Comments
 (0)