Skip to content

Commit

Permalink
fix(mission-server): Fix GetItemsSnapshot return type
Browse files Browse the repository at this point in the history
Changed the return type of GetItemsSnapshot to ImmutableArray. This ensures the returned collection is immutable, providing better security and stability.
  • Loading branch information
asvol committed Sep 7, 2024
1 parent 0f9fec1 commit 1a2d7cd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public void RemoveItems(IEnumerable<ServerMissionItem> items)

public ImmutableArray<ServerMissionItem> GetItemsSnapshot()
{
return [.._missionSource.Items];
return _missionSource.Items.ToImmutableArray();
}
}

0 comments on commit 1a2d7cd

Please sign in to comment.