Commit 5b4d8221 authored by Becca Hughes's avatar Becca Hughes Committed by Commit Bot

Make content attributes optional

For normal images contentAttributes are optional in
the spec but the converter requires them. This makes
them optional.

Change-Id: I4073de51009e6e7802667b2d79a7ad485d939978
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363477
Auto-Submit: Becca Hughes <beccahughes@chromium.org>
Commit-Queue: Sam Bowen <sgbowen@google.com>
Reviewed-by: default avatarSam Bowen <sgbowen@google.com>
Cr-Commit-Position: refs/heads/master@{#799388}
parent f0fc9ffb
...@@ -330,10 +330,7 @@ MediaFeedsConverter::GetMediaImage(const Property& property) { ...@@ -330,10 +330,7 @@ MediaFeedsConverter::GetMediaImage(const Property& property) {
image->src = url->values->url_values[0]; image->src = url->values->url_values[0];
auto content_attributes = GetContentAttributes(image_object); auto content_attributes = GetContentAttributes(image_object);
if (!content_attributes.has_value()) if (content_attributes && !content_attributes.value().empty()) {
continue;
if (!content_attributes.value().empty()) {
image->content_attributes = std::move(content_attributes.value()); image->content_attributes = std::move(content_attributes.value());
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment