Skip to content

Commit

Permalink
Use conditional chaining, as body may not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathansampson committed May 21, 2021
1 parent 671e91d commit 75fafb1
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 75fafb1

Please sign in to comment.