Skip to content

Commit e86f231

Browse files
committed
less ideal solution but the wasPush test succeeds
1 parent 166b7a3 commit e86f231

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

router.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export function LocationProvider(props) {
8989
const RESOLVED = Promise.resolve();
9090

9191
export function Router(props) {
92-
const [c, update] = useReducer(c => c + 1, 0);
92+
const [, update] = useReducer(c => c + 1, 0);
9393

9494
const { url, query, wasPush, path } = useLocation();
9595
const { rest = path, params = {} } = useContext(RouteContext);
@@ -180,7 +180,7 @@ export function Router(props) {
180180
if (wasPush) scrollTo(0, 0);
181181
if (props.onLoadEnd && isLoading.current) props.onLoadEnd(url);
182182
isLoading.current = false;
183-
}, [c]);
183+
});
184184

185185
// Note: curChildren MUST render first in order to set didSuspend & prev.
186186
return [h(RenderRef, { r: cur }), h(RenderRef, { r: prev })];

0 commit comments

Comments
 (0)