We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be9297a commit c831529Copy full SHA for c831529
components/brave_today/browser/brave_news_controller.cc
@@ -336,8 +336,8 @@ void BraveNewsController::GetDisplayAd(GetDisplayAdCallback callback) {
336
auto ad = mojom::DisplayAd::New();
337
ad->uuid = *ad_data.FindStringKey("uuid");
338
ad->creative_instance_id = *ad_data.FindStringKey("creativeInstanceId");
339
- if (ad_data.HasKey("ctaText"))
340
- ad->cta_text = *ad_data.FindStringKey("ctaText");
+ if (const auto* cta_text = ad_data.FindStringKey("ctaText"))
+ ad->cta_text = *cta_text;
341
ad->dimensions = *ad_data.FindStringKey("dimensions");
342
ad->title = *ad_data.FindStringKey("title");
343
ad->description = *ad_data.FindStringKey("description");
0 commit comments