@tanstack/react-router 1.97.17 → 1.97.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/router.cjs +9 -4
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/router.js +9 -4
- package/dist/esm/router.js.map +1 -1
- package/package.json +5 -5
- package/src/router.ts +9 -4
package/dist/cjs/router.cjs
CHANGED
|
@@ -31,7 +31,9 @@ function validateSearch(validateSearch2, input) {
|
|
|
31
31
|
if (result instanceof Promise)
|
|
32
32
|
throw new SearchParamError("Async validation not supported");
|
|
33
33
|
if (result.issues)
|
|
34
|
-
throw new SearchParamError(JSON.stringify(result.issues, void 0, 2)
|
|
34
|
+
throw new SearchParamError(JSON.stringify(result.issues, void 0, 2), {
|
|
35
|
+
cause: result
|
|
36
|
+
});
|
|
35
37
|
return result.value;
|
|
36
38
|
}
|
|
37
39
|
if ("parse" in validateSearch2) {
|
|
@@ -1494,9 +1496,12 @@ class Router {
|
|
|
1494
1496
|
void 0
|
|
1495
1497
|
];
|
|
1496
1498
|
} catch (err) {
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1499
|
+
let searchParamError = err;
|
|
1500
|
+
if (!(err instanceof SearchParamError)) {
|
|
1501
|
+
searchParamError = new SearchParamError(err.message, {
|
|
1502
|
+
cause: err
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1500
1505
|
if (opts == null ? void 0 : opts.throwOnError) {
|
|
1501
1506
|
throw searchParamError;
|
|
1502
1507
|
}
|