Defensive check for QueryText being empty

This commit is contained in:
ryanbodrug-microsoft
2020-04-25 12:18:40 -07:00
parent ad0f965f3a
commit eaf05aa31a

View File

@@ -351,8 +351,7 @@ namespace PowerLauncher
private string ListView_FirstItem(String input)
{
string s = input;
if (s.Length > 0)
if (!String.IsNullOrEmpty(input))
{
String selectedItem = _viewModel.Results?.SelectedItem?.ToString();
int selectedIndex = _viewModel.Results.SelectedIndex;