From c2668509b2788b5d8c468eafcaa11db5208c33f4 Mon Sep 17 00:00:00 2001 From: soul Date: Tue, 10 Nov 2026 15:08:37 +0000 Subject: [PATCH] GovernanceVectorTests: Clone keeps a nil node nil (null choice and note in stored answers) Co-Authored-By: Claude Sonnet 5.5 --- tests/GameCult.Networking.Tests/GovernanceVectorTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/GameCult.Networking.Tests/GovernanceVectorTests.cs b/tests/GameCult.Networking.Tests/GovernanceVectorTests.cs index aa507c03..4014fc23 100644 --- a/tests/GameCult.Networking.Tests/GovernanceVectorTests.cs +++ b/tests/GameCult.Networking.Tests/GovernanceVectorTests.cs @@ -72,7 +72,7 @@ namespace GameCult.Networking.Tests private static string Sha(byte[] bytes) => Convert.ToHexString(SHA256.HashData(bytes)).ToLowerInvariant(); private static string S(JsonNode? n) => n!.GetValue(); - private static JsonNode Clone(JsonNode? n) => JsonNode.Parse(n!.ToJsonString())!; + private static JsonNode? Clone(JsonNode? n) => n is null ? null : JsonNode.Parse(n.ToJsonString()); [Test] public void VoteApi_ValidDocuments_ValidateEncodeToTheVectorBytesAndDecodeBack()