diff --git a/plugins/woocommerce-admin/client/customize-store/design-with-ai/services.ts b/plugins/woocommerce-admin/client/customize-store/design-with-ai/services.ts index a10ff8c9efe..e672a4fb9dc 100644 --- a/plugins/woocommerce-admin/client/customize-store/design-with-ai/services.ts +++ b/plugins/woocommerce-admin/client/customize-store/design-with-ai/services.ts @@ -253,8 +253,8 @@ export const updateStorePatterns = async ( method: 'GET', } ); - if ( ! images.images.length ) { - if ( is_ai_generated ) { + if ( ! images ) { + if ( ! is_ai_generated ) { throw new Error( 'AI content not generated: images not available' ); diff --git a/plugins/woocommerce/changelog/46872-46839-fix-error-on-same-prompt b/plugins/woocommerce/changelog/46872-46839-fix-error-on-same-prompt new file mode 100644 index 00000000000..c5a630d3c44 --- /dev/null +++ b/plugins/woocommerce/changelog/46872-46839-fix-error-on-same-prompt @@ -0,0 +1,4 @@ +Significance: minor +Type: fix + +[CYS] Fix bug making the AI flow fail on the same prompt. \ No newline at end of file