Skip to content

Commit 4a826fa

Browse files
author
Brendan Stromberger
authored
react-router-redux/createMatchSelector: handle null case when router state is not yet initialized
1 parent d6ac814 commit 4a826fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-router-redux/modules/selectors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const createMatchSelector = (path) => {
66
let lastPathname = null
77
let lastMatch = null
88
return (state) => {
9-
const { pathname } = getLocation(state)
9+
const { pathname } = getLocation(state) || {}
1010
if (pathname === lastPathname) {
1111
return lastMatch
1212
}

0 commit comments

Comments
 (0)