Skip to content

Commit 666f08f

Browse files
committed
Bail out of updating settings if the configuration is not valid or enabled
1 parent d8ede19 commit 666f08f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Source/Shared/Configuration/SettingsManager.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,9 @@ public static void CheckVersion(int version, ExceptionlessConfiguration config)
6868
}
6969

7070
public static void UpdateSettings(ExceptionlessConfiguration config, int? version = null) {
71-
if (config == null)
71+
if (config == null || !config.IsValid || !config.Enabled)
7272
return;
7373

74-
if (String.IsNullOrEmpty(config.ApiKey) || String.Equals(config.ApiKey, "API_KEY_HERE", StringComparison.OrdinalIgnoreCase)) {
75-
config.Resolver.GetLog().Error(typeof(SettingsManager), "Unable to update settings: ApiKey is not set.");
76-
return;
77-
}
78-
7974
try {
8075
if (!version.HasValue || version < 0)
8176
version = GetVersion(config);

0 commit comments

Comments
 (0)