Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 023fda0

Browse files
committed
Update callers of RefHolder.map() that use the return value
1 parent 8a35a7c commit 023fda0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/views/commit-view.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ export default class CommitView extends React.Component {
388388
}
389389

390390
excludeCoAuthor() {
391-
const author = this.refCoAuthorSelect.map(c => c.getFocusedOption());
391+
const author = this.refCoAuthorSelect.map(c => c.getFocusedOption()).getOr(null);
392392
if (!author || author.isNew()) {
393393
return;
394394
}
@@ -548,15 +548,15 @@ export default class CommitView extends React.Component {
548548
return CommitView.focus.EDITOR;
549549
}
550550

551-
if (this.refAbortMergeButton.map(e => e.contains(event.target))) {
551+
if (this.refAbortMergeButton.map(e => e.contains(event.target)).getOr(false)) {
552552
return CommitView.focus.ABORT_MERGE_BUTTON;
553553
}
554554

555-
if (this.refCommitButton.map(e => e.contains(event.target))) {
555+
if (this.refCommitButton.map(e => e.contains(event.target)).getOr(false)) {
556556
return CommitView.focus.COMMIT_BUTTON;
557557
}
558558

559-
if (this.refCoAuthorSelect.map(c => c.wrapper.contains(event.target))) {
559+
if (this.refCoAuthorSelect.map(c => c.wrapper.contains(event.target)).getOr(false)) {
560560
return CommitView.focus.COAUTHOR_INPUT;
561561
}
562562

0 commit comments

Comments
 (0)