Skip to content

Commit

Permalink
PWA-3359 : Allowing null values into the Product Thumbnail GrapQL in …
Browse files Browse the repository at this point in the history
…orderRow.pql.js and Adding Transparent Placeholder image for deleted products on order history screen in collapsedImageGallery.js file.
  • Loading branch information
del15881 committed Oct 9, 2024
1 parent 6d38221 commit 2a46975
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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

0 comments on commit 2a46975

Please sign in to comment.