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 {