Skip to content

Commit a14416a

Browse files
authored
Merge pull request #106 from umbraco/bugfix/algolia-rte-indexing
Fix indexing for empty RTEs
2 parents 1250173 + 67eff7b commit a14416a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ 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

39-
var indexValue = indexValues.FirstOrDefault();
39+
var indexValue = indexValues.First();
4040

4141
if (Converters.ContainsKey(property.PropertyType.PropertyEditorAlias))
4242
{
@@ -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

src/Umbraco.Cms.Integrations.Search.Algolia/Umbraco.Cms.Integrations.Search.Algolia.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PackageIconUrl></PackageIconUrl>
1414
<PackageProjectUrl>https://github.com/umbraco/Umbraco.Cms.Integrations/tree/main/src/Umbraco.Cms.Integrations.Search.Algolia</PackageProjectUrl>
1515
<RepositoryUrl>https://github.com/umbraco/Umbraco.Cms.Integrations</RepositoryUrl>
16-
<Version>1.3.1</Version>
16+
<Version>1.3.2</Version>
1717
<Authors>Umbraco HQ</Authors>
1818
<Company>Umbraco</Company>
1919
<PackageTags>Umbraco;Umbraco-Marketplace</PackageTags>

0 commit comments

Comments
 (0)