use singleordefault instead of single since sometims the queue may be empty but method doesn't return

This commit is contained in:
弘韬 张 2020-12-05 15:48:36 +08:00
parent 756c5bce3d
commit b8d3b42295

View file

@ -724,7 +724,8 @@ namespace Flow.Launcher.ViewModel
try
{
token = resultsForUpdates.Select(r => r.Token).Distinct().Single();
// Don't know why sometimes even resultsForUpdates is empty, the method won't return;
token = resultsForUpdates.Select(r => r.Token).Distinct().SingleOrDefault();
}
#if DEBUG
catch