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 9ec4c4a commit 715223aCopy full SHA for 715223a
1 file changed
packages/wouter/src/index.js
@@ -150,8 +150,9 @@ export const Router = ({ children, ...props }) => {
150
// also, ensure ssrSearch is always defined when ssrPath is provided, so that
151
// useSearch behavior matches usePathname (proper SSR hydration when client
152
// renders <Router> without props after server rendered with ssrPath/ssrSearch)
153
- const [path, search = props.ssrSearch ?? ""] = props.ssrPath?.split("?") ?? [];
154
- if (path) props.ssrSearch = search, props.ssrPath = path;
+ const [path, search = props.ssrSearch ?? ""] =
+ props.ssrPath?.split("?") ?? [];
155
+ if (path) (props.ssrSearch = search), (props.ssrPath = path);
156
157
// hooks can define their own `href` formatter (e.g. for hash location)
158
props.hrefs = props.hrefs ?? props.hook?.hrefs;
0 commit comments