Skip to content

Commit 755c032

Browse files
ostapchmolefrog
authored andcommitted
Fix router memoization
1 parent 2b1e5eb commit 755c032

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/wouter/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export const Router = ({ children, ...props }) => {
181181
next[k] = option;
182182

183183
// the new router is no different from the parent, use parent
184-
if (option !== parent[k]) value = next;
184+
if (option !== parent[k] || option !== value[k]) value = next;
185185
}
186186

187187
return h(RouterCtx.Provider, { value, children });

0 commit comments

Comments
 (0)