@dharmax/state-router 3.1.2 → 3.2.0
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/router.d.ts +1 -1
- package/dist/router.js +1 -1
- package/package.json +1 -1
- package/src/router.ts +2 -2
package/dist/router.d.ts
CHANGED
package/dist/router.js
CHANGED
|
@@ -60,7 +60,7 @@ class Router {
|
|
|
60
60
|
if (match) {
|
|
61
61
|
match.shift(); // Remove the full match element
|
|
62
62
|
const queryParams = Object.fromEntries(new URLSearchParams(window.location.search));
|
|
63
|
-
route.handler
|
|
63
|
+
route.handler({ queryParams }, match);
|
|
64
64
|
return true;
|
|
65
65
|
}
|
|
66
66
|
}
|
package/package.json
CHANGED
package/src/router.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type RouteHandler = (...args:
|
|
1
|
+
type RouteHandler = (...args: any[]) => void;
|
|
2
2
|
|
|
3
3
|
interface Route {
|
|
4
4
|
pattern: RegExp | null;
|
|
@@ -77,7 +77,7 @@ class Router {
|
|
|
77
77
|
if (match) {
|
|
78
78
|
match.shift(); // Remove the full match element
|
|
79
79
|
const queryParams = Object.fromEntries(new URLSearchParams(window.location.search));
|
|
80
|
-
route.handler
|
|
80
|
+
route.handler( {queryParams}, match);
|
|
81
81
|
return true
|
|
82
82
|
}
|
|
83
83
|
}
|