From 60dc1c938ba4ea8406b22cf7d4fe285d7528d045 Mon Sep 17 00:00:00 2001 From: Adrien Jaillet <61200077+a-jaillet@users.noreply.github.com> Date: Thu, 14 Jan 2021 14:50:40 +0100 Subject: [PATCH] Update packages/client/src/app/inventory-management/inventory-tools/articles/articles.component.ts Co-authored-by: Marc-Antoine --- .../inventory-tools/articles/articles.component.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/client/src/app/inventory-management/inventory-tools/articles/articles.component.ts b/packages/client/src/app/inventory-management/inventory-tools/articles/articles.component.ts index daa460c9..2cb839aa 100644 --- a/packages/client/src/app/inventory-management/inventory-tools/articles/articles.component.ts +++ b/packages/client/src/app/inventory-management/inventory-tools/articles/articles.component.ts @@ -232,12 +232,7 @@ export class ArticlesComponent implements OnInit{ } public productExist(productName: string): boolean { - if(this.products.map(product => product.name).indexOf(productName)===-1){ - return false; - } - else { - return true; - } + return this.products.some(p => p.name === productName); } public onConvertKaisse(): void {