Foxhound icon indicating copy to clipboard operation
Foxhound copied to clipboard

no menu appears

Open qurtopianodesign opened this issue 6 years ago • 1 comments

hi, I have a problem with the menu, I get an error in the console of this type: Uncaught TypeError: "Can not read property 'pathname' of undefined at Function.mapToProps",

the problem is in index.jsx export default connect( state => { const path = FoxhoundSettings.URL.path || '/'; const menu = getMenu( state, 'primary' ); return { currentPage: state.routing.locationBeforeTransitions.pathname || path, <------- here menu: menu || [], }; } )( Navigation );

what can I do to solve it?

thank you regards

qurtopianodesign avatar May 17 '18 08:05 qurtopianodesign

seems that react-router changed the way to access the pathname, @qurtopianodesign change locationBeforeTransitions.pathname to location.pathname it worked for me

check: https://github.com/reactjs/react-router-redux#how-do-i-access-router-state-in-a-container-component

JFernandoGomez avatar Nov 28 '18 06:11 JFernandoGomez