Skip to content

Commit fe0caba

Browse files
committed
Fix Nullable reference types
1 parent dcf550a commit fe0caba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Nager.Date/HolidaySpecificationProcessor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ internal static IEnumerable<Holiday> Process(
2828
EnglishName = holidaySpecification.EnglishName,
2929
LocalName = holidaySpecification.LocalName,
3030
HolidayTypes = holidaySpecification.HolidayTypes,
31-
SubdivisionCodes = holidaySpecification.SubdivisionCodes ?? [],
31+
SubdivisionCodes = holidaySpecification.SubdivisionCodes,
3232
ObservedDate = holidaySpecification.ObservedRuleSet?.GetObservedDate(holidayDate) ?? holidayDate,
3333
CountryCode = countryCode
3434
};

src/Nager.Date/Models/Holiday.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class Holiday
4242
/// The initial subdivision of the country (ISO 3166-2) where the holiday is observed
4343
/// </summary>
4444
/// <remarks>States, Province, Territories, Federal districts, Cantons</remarks>
45-
public string[] SubdivisionCodes { get; set; } = [];
45+
public string[]? SubdivisionCodes { get; set; }
4646

4747
/// <summary>
4848
/// The types of the holiday

0 commit comments

Comments
 (0)