Skip to content
Snippets Groups Projects
Commit b241b93b authored by KDSBrowne's avatar KDSBrowne
Browse files

replace indexOf() with includes()

parent b9736e9c
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ const ActionsBarContainer = props => <ActionsBar {...props} />;
export default withRouter(withTracker(({ location, router }) => {
const togglePollMenu = () => {
return location.pathname.indexOf('/poll') !== -1
return location.pathname.includes('poll')
? router.push('/') : router.push('/users/poll');
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment