From ca0e011f5c233cb409ae6cacb2cf0f5ab295b25f Mon Sep 17 00:00:00 2001 From: ehsan shariati Date: Tue, 9 Apr 2024 20:50:05 -0400 Subject: [PATCH] removing already uploaded cids when replicate --- src/protocols/chain-api.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/protocols/chain-api.ts b/src/protocols/chain-api.ts index 936dbc3..a88d0e4 100644 --- a/src/protocols/chain-api.ts +++ b/src/protocols/chain-api.ts @@ -333,7 +333,12 @@ export const manifestNewBatch = async ( .catch((err) => { console.log(err); }); - if (!manifestInfo || manifestInfo == '' || manifestInfo == null) { + if ( + !manifestInfo || + manifestInfo.isEmpty || + manifestInfo.toString() === '' || + manifestInfo == null + ) { newCids.push(cid); } else { let formattedManifestInfo: BType.ManifestResponse = JSON.parse(