Skip to content

Commit 1eee3c3

Browse files
committed
do not use window ref
1 parent ff26e41 commit 1eee3c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export default function DynamicRoute(props) {
4040
path="/"
4141
render={({ history }) => (
4242
<AsyncComponent
43-
path={window.location.pathname}
44-
search={window.location.search}
45-
component={props.page(window.location.pathname)}
43+
path={history.location.pathname}
44+
search={history.location.search}
45+
component={props.page(history.location.pathname)}
4646
loading={props.loading || 'Loading..'}
4747
onError={props.onError}
4848
otherProps={props.props}

0 commit comments

Comments
 (0)