diff --git a/src/Sitecore.Support.96931/ContentSearch/Azure/CloudSearchDocumentBuilder.cs b/src/Sitecore.Support.96931/ContentSearch/Azure/CloudSearchDocumentBuilder.cs index 2bb26fb..494d342 100644 --- a/src/Sitecore.Support.96931/ContentSearch/Azure/CloudSearchDocumentBuilder.cs +++ b/src/Sitecore.Support.96931/ContentSearch/Azure/CloudSearchDocumentBuilder.cs @@ -18,7 +18,7 @@ public CloudSearchDocumentBuilder(IIndexable indexable, IProviderUpdateContext c protected override void AddComputedIndexFieldsInParallel() { ConcurrentQueue exceptions = new ConcurrentQueue(); - var needEnterLanguageFallbackItemSwitcher = LanguageFallbackItemSwitcher.CurrentValue; + var needEnterLanguageFallbackItemSwitcher = LanguageFallbackItemSwitcher.CurrentValue ?? false; ParallelForeachProxy.ForEach((IEnumerable)Options.ComputedIndexFields, ParallelOptions, (Action)delegate (IComputedIndexField computedIndexField, ParallelLoopState parallelLoopState) { object fieldValue; diff --git a/src/Sitecore.Support.96931/ContentSearch/LuceneProvider/LuceneDocumentBuilder.cs b/src/Sitecore.Support.96931/ContentSearch/LuceneProvider/LuceneDocumentBuilder.cs index ad0debe..8d6d8ef 100644 --- a/src/Sitecore.Support.96931/ContentSearch/LuceneProvider/LuceneDocumentBuilder.cs +++ b/src/Sitecore.Support.96931/ContentSearch/LuceneProvider/LuceneDocumentBuilder.cs @@ -19,7 +19,7 @@ public LuceneDocumentBuilder(IIndexable indexable, IProviderUpdateContext contex protected override void AddComputedIndexFieldsInParallel() { ConcurrentQueue exceptions = new ConcurrentQueue(); - var needEnterLanguageFallbackItemSwitcher = LanguageFallbackItemSwitcher.CurrentValue; + var needEnterLanguageFallbackItemSwitcher = LanguageFallbackItemSwitcher.CurrentValue ?? false; ParallelForeachProxy.ForEach((IEnumerable)Options.ComputedIndexFields, ParallelOptions, (Action)delegate (IComputedIndexField computedIndexField, ParallelLoopState parallelLoopState) { object fieldValue; diff --git a/src/Sitecore.Support.96931/XA/Foundation/VersionSpecific/CustomSolrDocumentBuilder.cs b/src/Sitecore.Support.96931/XA/Foundation/VersionSpecific/CustomSolrDocumentBuilder.cs index 2e95ea1..1cdcd5f 100644 --- a/src/Sitecore.Support.96931/XA/Foundation/VersionSpecific/CustomSolrDocumentBuilder.cs +++ b/src/Sitecore.Support.96931/XA/Foundation/VersionSpecific/CustomSolrDocumentBuilder.cs @@ -19,7 +19,7 @@ public CustomSolrDocumentBuilder(IIndexable indexable, IProviderUpdateContext co protected override void AddComputedIndexFieldsInParallel() { ConcurrentQueue exceptions = new ConcurrentQueue(); - var needEnterLanguageFallbackItemSwitcher = LanguageFallbackItemSwitcher.CurrentValue; + var needEnterLanguageFallbackItemSwitcher = LanguageFallbackItemSwitcher.CurrentValue ?? false; ParallelForeachProxy.ForEach((IEnumerable)Options.ComputedIndexFields, ParallelOptions, (Action)delegate (IComputedIndexField computedIndexField, ParallelLoopState parallelLoopState) { object fieldValue;