Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWA-3359 : Allowing null values into the Product Thumbnail GrapQL in … #4342

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const GET_CONFIGURABLE_THUMBNAIL_SOURCE = gql`
`;

export const GET_PRODUCT_THUMBNAILS_BY_URL_KEY = gql`
query GetProductThumbnailsByURLKey($urlKeys: [String!]!) {
query GetProductThumbnailsByURLKey($urlKeys: [String]!) {
products(filter: { url_key: { in: $urlKeys } }) {
# eslint-disable-next-line @graphql-eslint/require-id-when-available
items {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ const CollapsedImageGallery = props => {
const baseImageElements = Object.values(items)
.slice(0, DISPLAY_COUNT)
.map((item, index) => {
if (!item) {
return null;
}
const { thumbnail, name } = item;
const { url } = thumbnail;

Expand Down