Fix request switcher active index when only workspaces match

This commit is contained in:
Gregory Schier
2019-05-10 00:05:27 -04:00
parent b46d14a71c
commit cc159d7090

View File

@@ -259,7 +259,7 @@ class RequestSwitcherModal extends React.PureComponent<Props, State> {
this.setState({
searchString,
activeIndex: indexOfFirstNonActiveRequest,
activeIndex: indexOfFirstNonActiveRequest >= 0 ? indexOfFirstNonActiveRequest : 0,
matchedRequests: (matchedRequests: Array<any>).slice(0, maxRequests),
matchedWorkspaces: matchedWorkspaces.slice(0, maxWorkspaces),
});