Skip to content

BMU-2640: fix null images situation#55

Merged
kafis merged 2 commits into
mainfrom
BMU-2640/fix-null-images-situation
May 20, 2026
Merged

BMU-2640: fix null images situation#55
kafis merged 2 commits into
mainfrom
BMU-2640/fix-null-images-situation

Conversation

@kafis
Copy link
Copy Markdown
Contributor

@kafis kafis commented May 20, 2026

null images also should lead to setImages action without images

@kafis kafis requested a review from a team as a code owner May 20, 2026 12:02
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 20, 2026

🦋 Changeset detected

Latest commit: 927d071

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@commercetools/sync-actions Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

// copyEmptyArrayProps converts both to [], so we preserve the original intent here.
const variantIdsWithoutImages = new Set(
(now.variants || []).filter((v) => !('images' in v)).map((v) => v.id)
(now.variants || [])
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we do like now?.variants?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2026-05-20 at 14 10 38

According to the types, now should never be undefined

@kafis kafis requested a review from nicolasnieto92 May 20, 2026 12:11
@kafis kafis merged commit 2c0543f into main May 20, 2026
10 checks passed
@ct-changesets ct-changesets Bot mentioned this pull request May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants