From dd8dee1c3bd1f5fa26856bf835493815164b8c8d Mon Sep 17 00:00:00 2001 From: David Mohundro Date: Mon, 5 Feb 2024 09:12:53 -0600 Subject: [PATCH] Fix UseSystemTextJsonForSerialization customization Closes #717 --- src/Wolverine/WolverineOptions.Serialization.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Wolverine/WolverineOptions.Serialization.cs b/src/Wolverine/WolverineOptions.Serialization.cs index d4d065b0c..23c6235fe 100644 --- a/src/Wolverine/WolverineOptions.Serialization.cs +++ b/src/Wolverine/WolverineOptions.Serialization.cs @@ -87,7 +87,7 @@ public void UseSystemTextJsonForSerialization(Action? con configuration?.Invoke(options); var serializer = new SystemTextJsonSerializer(options); - _defaultSerializer ??= serializer; + _defaultSerializer = serializer; _serializers[serializer.ContentType] = serializer; } @@ -120,4 +120,4 @@ public void AddSerializer(IMessageSerializer serializer) { _serializers[serializer.ContentType] = serializer; } -} \ No newline at end of file +}