Skip to content

Commit 7c27ff4

Browse files
committed
Fix indexing for empty RTEs
1 parent 1250173 commit 7c27ff4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Umbraco.Cms.Integrations.Search.Algolia/Services/AlgoliaSearchPropertyIndexValueFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public virtual KeyValuePair<string, string> GetValue(IProperty property, string
3434

3535
var indexValues = dataType.Editor.PropertyIndexValueFactory.GetIndexValues(property, culture, string.Empty, true);
3636

37-
if(indexValues == null) return default;
37+
if (indexValues == null || !indexValues.Any()) return new KeyValuePair<string, string>(property.Alias, string.Empty);
3838

3939
var indexValue = indexValues.FirstOrDefault();
4040

@@ -67,7 +67,7 @@ private string ConvertMediaPicker(KeyValuePair<string, IEnumerable<object>> inde
6767

6868
var parsedIndexValue = ParseIndexValue(indexValue.Value);
6969

70-
if(string.IsNullOrEmpty(parsedIndexValue)) return string.Empty;
70+
if (string.IsNullOrEmpty(parsedIndexValue)) return string.Empty;
7171

7272
var inputMedia = JsonSerializer.Deserialize<IEnumerable<MediaItem>>(parsedIndexValue);
7373

0 commit comments

Comments
 (0)