Skip to content

Commit

Permalink
Merge pull request #8894 from brave/fix-12217
Browse files Browse the repository at this point in the history
Use conditional chaining, as body may not exist
  • Loading branch information
tmancey authored May 21, 2021
2 parents 958b19e + 75fafb1 commit e6f6c7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion browser/brave_ads/ads_tab_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void AdsTabHelper::RunIsolatedJavaScript(
weak_factory_.GetWeakPtr()));

dom_distiller::RunIsolatedJavaScript(
render_frame_host, "document.body.innerText",
render_frame_host, "document?.body?.innerText",
base::BindOnce(&AdsTabHelper::OnJavaScriptTextResult,
weak_factory_.GetWeakPtr()));
}
Expand Down

0 comments on commit e6f6c7a

Please sign in to comment.