Skip to content

Commit

Permalink
Move focusedOption check
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Jul 1, 2022
1 parent daff15b commit d616b01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/OptionsSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ class OptionsSelector extends Component {
this.unsubscribeCTRLEnter = KeyboardShortcut.subscribe(
CTRLEnterConfig.shortcutKey,
() => {
const focusedOption = this.state.allOptions[this.state.focusedIndex];
if (this.props.canSelectMultipleOptions) {
this.props.onConfirmSelection();
return;
}

const focusedOption = this.state.allOptions[this.state.focusedIndex];
if (!focusedOption) {
return;
}
Expand Down

0 comments on commit d616b01

Please sign in to comment.