You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
seems that react-router changed the way to access the pathname, @qurtopianodesign change locationBeforeTransitions.pathname to location.pathname it worked for me
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
The text was updated successfully, but these errors were encountered: