Skip to content

Commit b35b9b6

Browse files
committed
Merge branch 'main' into feature/v12-support
# Conflicts: # src/Umbraco.Cms.Integrations.Search.Algolia/Umbraco.Cms.Integrations.Search.Algolia.csproj
2 parents 5331cff + a14416a commit b35b9b6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,3 +334,8 @@ src/Umbraco.Cms.Integrations.SEO.Semrush.Testsite.V8/App_Data/
334334
src/Umbraco.Cms.Integrations.SEO.Semrush.Testsite.V8/App_Plugins/
335335

336336
appsettings.Local.json
337+
src/Umbraco.Cms.Integrations.Testsite.V11/App_Plugins/
338+
src/Umbraco.Cms.Integrations.Testsite.V11/Views/
339+
src/Umbraco.Cms.Integrations.Testsite.V12/App_Plugins/
340+
src/Umbraco.Cms.Integrations.Testsite.V12/Views/_ViewImports.cshtml
341+
src/Umbraco.Cms.Integrations.Testsite.V12/Views/

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

0 commit comments

Comments
 (0)