diff --git a/src/components/QuickOpenModal.js b/src/components/QuickOpenModal.js index f80f5dee3b..426bf5b614 100644 --- a/src/components/QuickOpenModal.js +++ b/src/components/QuickOpenModal.js @@ -242,7 +242,14 @@ export class QuickOpenModal extends Component { } }; - resultCount = () => (this.state.results ? this.state.results.length : 0); + resultCount = () => { + const results = this.state.results; + + if (results && results.length) { + return results.length; + } + return 0; + }; isSymbolSearch = () => ["functions", "variables"].includes(this.props.searchType);