diff --git a/tools/Dashboard/DevHome.Dashboard/Services/WidgetServiceService.cs b/tools/Dashboard/DevHome.Dashboard/Services/WidgetServiceService.cs index 3929477015..2a2b1c02ae 100644 --- a/tools/Dashboard/DevHome.Dashboard/Services/WidgetServiceService.cs +++ b/tools/Dashboard/DevHome.Dashboard/Services/WidgetServiceService.cs @@ -79,7 +79,7 @@ private Package GetWebExperiencePackPackage() WidgetHelpers.WebExperiencePackageFamilyName, (minSupportedVersion400, version500), (minSupportedVersion500, null)); - return packages.First(); + return packages.FirstOrDefault(); } private Package GetWidgetsPlatformRuntimePackage() @@ -87,7 +87,7 @@ private Package GetWidgetsPlatformRuntimePackage() var minSupportedVersion = new Version(1, 0, 0, 0); var packages = _packageDeploymentService.FindPackagesForCurrentUser(WidgetHelpers.WidgetsPlatformRuntimePackageFamilyName, (minSupportedVersion, null)); - return packages.First(); + return packages.FirstOrDefault(); } private WidgetServiceStates ValidatePackage(Package package)