Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Use `Array.some`

dominik-zeglen063b46d3c1e1
diff --git a/saleor/static/dashboard-next/components/AssignProductDialog/AssignProductDialog.tsx b/saleor/static/dashboard-next/components/AssignProductDialog/AssignProductDialog.tsx
index 7b07667871..5099ed2eb9 100644
--- a/saleor/static/dashboard-next/components/AssignProductDialog/AssignProductDialog.tsx
+++ b/saleor/static/dashboard-next/components/AssignProductDialog/AssignProductDialog.tsx
@@ -130,7 +130,7 @@ const AssignProductDialog = withStyles(styles, {
<TableBody>
{products &&
products.map(product => {
- const isSelected = !!selectedProducts.find(
+ const isSelected = selectedProducts.some(
selectedProduct => selectedProduct.id === product.id
);