diff --git a/src/components/CommandPalette.jsx b/src/components/CommandPalette.jsx index 96d2c33..69bc0dd 100644 --- a/src/components/CommandPalette.jsx +++ b/src/components/CommandPalette.jsx @@ -78,7 +78,7 @@ export class CommandPalette extends Component { }); return; } - if (e.which === ENTER_KEY) { + if (e.which === ENTER_KEY && this.state.list.length) { this.selectOption(this.state.list[this.state.selectedIndex]); } } @@ -118,6 +118,9 @@ export class CommandPalette extends Component { onKeyUp={this.keyDownHandler.bind(this)} style="width:100%" /> + {!this.props.files.length && !this.state.list.length ? ( +
Nothing to search here.
+ ) : null}