From 47fca3f5a75f84da0e4efe0ffe43a55f9907e0ca Mon Sep 17 00:00:00 2001 From: Labham Jain Date: Wed, 1 Nov 2023 13:57:22 +0530 Subject: [PATCH] fix: remove unused variable --- src/services/product.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/services/product.ts b/src/services/product.ts index 4af89c5..5e276d0 100644 --- a/src/services/product.ts +++ b/src/services/product.ts @@ -71,7 +71,6 @@ class ProductService extends BaseProductService { return new Promise>(async (resolve, reject) => { if (product.id) { let productExists; - let isUpdating; try { await this.retrieve(product.id) productExists = true @@ -80,19 +79,17 @@ class ProductService extends BaseProductService { } try { if (productExists) { - isUpdating = true const { id, rowNumber, ...updateProduct } = product as UpdateProductInput & { id: string; rowNumber: number; }; const { product: updatedProduct } = await this.updateProductWithFetch(id, updateProduct) resolve({ ...updatedProduct, rowNumber }); } else { - isUpdating = false const { id, rowNumber, ...createProduct } = product as CreateProductInput & { id: string; rowNumber: number; } const { product: createdProduct } = await this.createProductWithFetch(createProduct); resolve({ ...createdProduct, rowNumber }) } } catch (error) { - console.log('\n\n\nAn error occurred!\n', error.response.data, '\n', JSON.stringify(product), '\n', isUpdating); + console.log('An error occurred!\n', error.response.data); } } else { const { id, rowNumber, ...createProduct } = product as CreateProductInput & { id: string, rowNumber: number; }