Skip to content

Commit 6d9174c

Browse files
committed
Set geo data to null on initialization
1 parent 5cb049b commit 6d9174c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@ namespace Umbraco.Cms.Integrations.Search.Algolia.Services
1111
public class AlgoliaIndexService : IAlgoliaIndexService
1212
{
1313
private readonly AlgoliaSettings _settings;
14-
private readonly IAlgoliaGeolocationProvider _algoliaGeolocationProvider;
1514

16-
public AlgoliaIndexService(IOptions<AlgoliaSettings> options, IAlgoliaGeolocationProvider algoliaGeolocationProvider)
15+
public AlgoliaIndexService(IOptions<AlgoliaSettings> options)
1716
{
1817
_settings = options.Value;
19-
_algoliaGeolocationProvider = algoliaGeolocationProvider;
2018
}
2119

2220
public async Task<Result> PushData(string name, List<Record> payload = null)
@@ -32,7 +30,7 @@ await index.SaveObjectsAsync(payload != null
3230
: new List<Record> {
3331
new Record {
3432
ObjectID = Guid.NewGuid().ToString(),
35-
GeolocationData = new List<GeolocationEntity>(),
33+
GeolocationData = null,
3634
Data = new Dictionary<string, object>()}
3735
}, autoGenerateObjectId: false);
3836

0 commit comments

Comments
 (0)