Skip to content

Commit c13d947

Browse files
committed
Initialize Conditions with an empty list of string to avoid potential null reference issues during iteration
1 parent 66e0bc1 commit c13d947

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ChatRPG/Data/Models/NarrativeEdge.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public NarrativeEdge(List<string> conditions, NarrativeNode sourceNode, Narrativ
2222
[JsonIgnore]
2323
public int Id { get; private set; }
2424

25-
public ICollection<string> Conditions { get; private set; } = null!;
25+
public ICollection<string> Conditions { get; private set; } = new List<string>();
2626

2727
[JsonIgnore]
2828
public int SourceNodeId { get; private set; }

0 commit comments

Comments
 (0)