Skip to content

Commit 6516dc7

Browse files
authored
Merge pull request #110 from Vettvangur/main
Allow properties to be in the varyByCulture state and without if the …
2 parents a14416a + bda859c commit 6516dc7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Umbraco.Cms.Integrations.Search.Algolia/Builders/ContentRecordBuilder.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Umbraco.Cms.Core.Services;
55
using Umbraco.Cms.Integrations.Search.Algolia.Models;
66
using Umbraco.Cms.Integrations.Search.Algolia.Services;
7+
using Umbraco.Extensions;
78

89
namespace Umbraco.Cms.Integrations.Search.Algolia.Builders
910
{
@@ -60,7 +61,8 @@ public ContentRecordBuilder BuildFromContent(IContent content, Func<IProperty, b
6061
{
6162
if (!_record.Data.ContainsKey(property.Alias))
6263
{
63-
if (content.PublishedCultures.Count() > 0)
64+
65+
if (property.PropertyType.VariesByCulture())
6466
{
6567
foreach (var culture in content.PublishedCultures)
6668
{

0 commit comments

Comments
 (0)