From 8ae319fbeee0c1fda9417f9762d5d2862f4e51ca Mon Sep 17 00:00:00 2001 From: Ryan Mroczenski Date: Tue, 18 Jun 2024 11:03:01 -0500 Subject: [PATCH] fix #2 for reals this time? --- Directory.Build.targets | 2 +- TweaksAndThings/TweaksAndThings.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index c8c6829..96fab01 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -12,7 +12,7 @@ 0 1 - 3 + 4 $(MajorVersion).$(MinorVersion).$(PatchVersion) $(AssemblyVersion) $(AssemblyVersion) diff --git a/TweaksAndThings/TweaksAndThings.cs b/TweaksAndThings/TweaksAndThings.cs index 734bea0..c7800d1 100644 --- a/TweaksAndThings/TweaksAndThings.cs +++ b/TweaksAndThings/TweaksAndThings.cs @@ -43,8 +43,9 @@ namespace TweaksAndThings //moddingContext.RegisterConsoleCommand(new EchoCommand()); settings = moddingContext.LoadSettingsData(self.Id); - if (!settings.WebhookSettingsList?.Any() ?? true) + if (!settings?.WebhookSettingsList?.Any() ?? true) { + if (settings == null) settings = new(); settings.WebhookSettingsList = new[] { new WebhookSettings() }.ToList(); this.moddingContext.SaveSettingsData(this.modDefinition.Id, settings ?? new()); }