Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Fix #4924 - Prevent NaN result count (#4925)
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwing authored and jasonLaster committed Dec 18, 2017
1 parent 9e3ad6e commit 53faca5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/QuickOpenModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,14 @@ export class QuickOpenModal extends Component<Props, State> {
}
};

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);
Expand Down

0 comments on commit 53faca5

Please sign in to comment.