Skip to content

Commit fa70d90

Browse files
chinesedfanHoussein Djirdeh
authored andcommitted
fix(issue): Fix crash due to undefined navigation params (#658)
1 parent e2b7fda commit fa70d90

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/issue/screens/issue.screen.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,16 +244,16 @@ class Issue extends Component {
244244

245245
handleActionSheetPress = index => {
246246
if (index === 0) {
247-
openURLInView(this.props.navigation.state.params.issue.html_url);
247+
openURLInView(this.props.issue.html_url);
248248
}
249249
};
250250

251251
postComment = body => {
252-
const { repository, navigation } = this.props;
252+
const { issue, repository } = this.props;
253253

254254
const repoName = repository.name;
255255
const owner = repository.owner.login;
256-
const issueNum = navigation.state.params.issue.number;
256+
const issueNum = issue.number;
257257

258258
this.props.postIssueComment(body, owner, repoName, issueNum);
259259
Keyboard.dismiss();

0 commit comments

Comments
 (0)