fix(polar): filter out custom products

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-03-19 09:36:07 +01:00
parent 1784a48bfc
commit b035c0d586
2 changed files with 6 additions and 2 deletions

View File

@@ -61,7 +61,9 @@ async function main() {
sorting: ['price_amount'], sorting: ['price_amount'],
}); });
return products.result.items.filter((product) => { return products.result.items.filter((product) => {
return product.metadata.custom !== true; return (
product.metadata.custom !== 'true' && product.metadata.custom !== true
);
}); });
} }

View File

@@ -29,7 +29,9 @@ export async function getProducts() {
sorting: ['price_amount'], sorting: ['price_amount'],
}); });
return products.result.items.filter((product) => { return products.result.items.filter((product) => {
return product.metadata.custom !== true; return (
product.metadata.custom !== 'true' && product.metadata.custom !== true
);
}); });
} }