Fixes for running using nuget package

Signed-off-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
Bjarke Berg
2020-07-10 13:00:54 +02:00
parent 1625cb323d
commit d94ecfe65e
4 changed files with 9 additions and 13 deletions

View File

@@ -19,8 +19,7 @@ namespace Umbraco.Web.HealthCheck.NotificationMethods
}
var notificationMethods = healthCheckSettingsConfig.NotificationSettings.NotificationMethods;
var notificationMethod = notificationMethods[attribute.Alias];
if (notificationMethod == null)
if(!notificationMethods.TryGetValue(attribute.Alias, out var notificationMethod))
{
Enabled = false;
return;