Skip to content

Commit

Permalink
Fix null ref (#61342)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwengier authored May 16, 2022
1 parent 2731a16 commit 608fa01
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public RazorDocumentExcerptServiceWrapper(IRazorDocumentExcerptServiceImplementa
};

var result = await _impl.TryExcerptAsync(document, span, razorMode, new RazorClassificationOptionsWrapper(classificationOptions), cancellationToken).ConfigureAwait(false);

if (result is null)
return null;

var razorExcerpt = result.Value;
return new ExcerptResult(razorExcerpt.Content, razorExcerpt.MappedSpan, razorExcerpt.ClassifiedSpans, razorExcerpt.Document, razorExcerpt.Span);
}
Expand Down

0 comments on commit 608fa01

Please sign in to comment.