Skip to content

Commit

Permalink
Fixed possible DocumentObjectModel null reference issue in DocumentOb…
Browse files Browse the repository at this point in the history
…jectModelExtractor.
  • Loading branch information
spencerohegartyDfE committed Jul 10, 2024
1 parent baf3ae5 commit 4122ca3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public sealed class HomePage : DocumentObjectModelExtractor
public HomePage(WebApplicationFactory<Program> webApplicationFactory) :
base(webApplicationFactory, PageName)
{
ArgumentNullException.ThrowIfNull(DocumentObjectModel);
_pageHeader = PageHeader.Create(DocumentObjectModel);
_pageBody = PageBody.Create(DocumentObjectModel);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace DfE.Data.SearchPrototype.Web.Tests.Integration.PageObjectModel.Setup;

public abstract class DocumentObjectModelExtractor : WebApplicationBootstrapper
{
protected IDocument DocumentObjectModel { get; private set; }
protected IDocument? DocumentObjectModel { get; private set; }

protected DocumentObjectModelExtractor(
WebApplicationFactory<Program> webApplicationFactory, string? pageName)
Expand Down

0 comments on commit 4122ca3

Please sign in to comment.