fix package analyses count should include variant count

This commit is contained in:
2025-09-10 10:11:14 +03:00
parent 96f82444a7
commit e324d6c5d1
3 changed files with 6 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
import { StoreProduct } from "@medusajs/types";
import type { AdminProductVariant, StoreProduct } from "@medusajs/types";
type Product = {
metadata?: {
@@ -11,7 +11,7 @@ type Product = {
} | null;
} | null;
export const getAnalysisElementMedusaProductIds = (products: Pick<StoreProduct, 'metadata'>[]) => {
export const getAnalysisElementMedusaProductIds = (products: (Pick<StoreProduct, 'metadata'> & { variant?: Pick<AdminProductVariant, 'metadata'> })[]) => {
if (!products) {
return [];
}