Skip to content

Commit

Permalink
fix(issue): Fix crash due to undefined navigation params (#658)
Browse files Browse the repository at this point in the history
  • Loading branch information
chinesedfan authored and Houssein Djirdeh committed Dec 10, 2017
1 parent e2b7fda commit fa70d90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/issue/screens/issue.screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,16 +244,16 @@ class Issue extends Component {

handleActionSheetPress = index => {
if (index === 0) {
openURLInView(this.props.navigation.state.params.issue.html_url);
openURLInView(this.props.issue.html_url);
}
};

postComment = body => {
const { repository, navigation } = this.props;
const { issue, repository } = this.props;

const repoName = repository.name;
const owner = repository.owner.login;
const issueNum = navigation.state.params.issue.number;
const issueNum = issue.number;

this.props.postIssueComment(body, owner, repoName, issueNum);
Keyboard.dismiss();
Expand Down

0 comments on commit fa70d90

Please sign in to comment.