Skip to content

Commit 4b9eabc

Browse files
committed
fix: fix potential issue with json emplacement
1 parent 093ef38 commit 4b9eabc

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Core/Helpers/Json/CustomConverters/TrileEmplacementListJsonConverter.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ public override void Write(
5151

5252
foreach (var pos in triles)
5353
{
54-
if (options.WriteIndented)
55-
{
56-
writer.WriteRawValue("\n" + new string(' ', writer.CurrentDepth * 2) + $"[{pos.X}, {pos.Y}, {pos.Z}]");
57-
}
54+
var rawValue = $"[{pos.X}, {pos.Y}, {pos.Z}]";
55+
56+
writer.WriteRawValue(options.WriteIndented
57+
? $"\n{new string(' ', writer.CurrentDepth * 2)}{rawValue}"
58+
: rawValue
59+
);
5860
}
5961

6062
writer.WriteEndArray();

0 commit comments

Comments
 (0)