Skip to content

Commit

Permalink
imp - Actually return an empty array on unsupported type
Browse files Browse the repository at this point in the history
---

We need to return an empty array and not null when we're trying to get an array of an unsupported type.

---

Type: imp
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Apr 1, 2024
1 parent ea1c11d commit 50293e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion VisualCard/Parts/Card.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public TPart[] GetPartsArray<TPart>(PartsArrayEnum key) where TPart : BaseCardPa
{
// Check for version support
if (!VcardParserTools.EnumArrayTypeSupported(key, CardVersion))
return null;
return [];

// Get the parts enumeration according to the type
var type = typeof(TPart);
Expand Down

0 comments on commit 50293e9

Please sign in to comment.