Skip to content

Commit

Permalink
Prevent System.ArgumentNullException in case switcher value is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulStupka committed Nov 8, 2018
1 parent 06d1d48 commit 8e7693a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public LuceneDocumentBuilder(IIndexable indexable, IProviderUpdateContext contex
protected override void AddComputedIndexFieldsInParallel()
{
ConcurrentQueue<Exception> exceptions = new ConcurrentQueue<Exception>();
var needEnterLanguageFallbackItemSwitcher = LanguageFallbackItemSwitcher.CurrentValue;
var needEnterLanguageFallbackItemSwitcher = LanguageFallbackItemSwitcher.CurrentValue ?? false;
Parallel.ForEach<IComputedIndexField>(base.Options.ComputedIndexFields, base.ParallelOptions, delegate (IComputedIndexField computedIndexField, ParallelLoopState parallelLoopState)
{
object fieldValue;
Expand Down

0 comments on commit 8e7693a

Please sign in to comment.