From 53ea691e44fbf32b7f406303feb24e6a0cd2f425 Mon Sep 17 00:00:00 2001 From: Sibunnayak Date: Sat, 2 Nov 2024 12:16:52 +0530 Subject: [PATCH] bug fixed --- src/views/PrincipalDistributors/UploadOpeningInventory.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/PrincipalDistributors/UploadOpeningInventory.js b/src/views/PrincipalDistributors/UploadOpeningInventory.js index cdd41f8..d2c503e 100644 --- a/src/views/PrincipalDistributors/UploadOpeningInventory.js +++ b/src/views/PrincipalDistributors/UploadOpeningInventory.js @@ -68,7 +68,7 @@ const UploadOpeningInventory = () => { } // Redirect or display success message - if (data?.errors && data?.errors.length > 0) { + if (data?.errors && data?.errors?.length > 0) { setErrors(data?.errors); swal({ title: "SpreadSheet Upload Successful", @@ -77,8 +77,8 @@ const UploadOpeningInventory = () => { button: "OK", }); } else if ( - data?.newlyCreated.length > 0 || - data?.updatedInventories.length > 0 + data?.newlyCreated?.length > 0 || + data?.updatedOpeningInventories?.length > 0 ) { swal({ title: "SpreadSheet Upload Successful",