We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4388a97 commit 0ed05f6Copy full SHA for 0ed05f6
packages/react-router/src/router.ts
@@ -1263,9 +1263,12 @@ export class Router<
1263
undefined,
1264
]
1265
} catch (err: any) {
1266
- const searchParamError = new SearchParamError(err.message, {
1267
- cause: err,
1268
- })
+ let searchParamError = err
+ if (!(err instanceof SearchParamError)) {
+ searchParamError = new SearchParamError(err.message, {
1269
+ cause: err,
1270
+ })
1271
+ }
1272
1273
if (opts?.throwOnError) {
1274
throw searchParamError
0 commit comments