Skip to content

Commit 0aa97fa

Browse files
committed
use props.location over props.history.location
1 parent 16bd55e commit 0aa97fa

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/utils/Router.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ import { BrowserRouter, Route, Redirect } from 'react-router-dom'
66
const Router = ({ children }) => (
77
<BrowserRouter>
88
<Route
9-
render={({
10-
history: {
11-
location: { pathname, search, hash },
12-
},
13-
}) =>
9+
render={({ location: { pathname, search, hash } }) =>
1410
pathname !== '/' && pathname.slice(-1) === '/' ? (
1511
<Redirect to={`${pathname.slice(0, -1)}${search}${hash}`} />
1612
) : (

0 commit comments

Comments
 (0)