Created
January 17, 2019 18:19
-
-
Save fdjones/93055c4de05a5ca183f392fcfda702d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// function must return | |
function foo() { | |
if (someCondition) { | |
return this.props.history.push('/somewhere'); | |
} | |
} | |
// this was ok | |
function foo() { | |
if (someCondition) { | |
this.props.history.push('/somewhere'); | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment