Check null in cachevalue for (#18395)

This commit is contained in:
Mole
2025-02-20 14:14:57 +01:00
committed by GitHub
parent 54dafd4031
commit ec77b2fa1b

View File

@@ -275,6 +275,12 @@ internal class PublishedProperty : PublishedPropertyBase
public CacheValue For(string? culture, string? segment)
{
// As noted on IPropertyValue, null value means invariant
// But as we need an actual string value to build a CompositeStringStringKey
// We need to convert null to empty
culture ??= string.Empty;
segment ??= string.Empty;
if (culture == string.Empty && segment == string.Empty)
{
return this;