Update src/Common/dataAccess/deleteDocument.ts

Co-authored-by: Ashley Stanton-Nurse <ashleyst@microsoft.com>
This commit is contained in:
Laurent Nguyen 2024-05-16 09:11:22 +02:00 committed by GitHub
parent 99e51047d1
commit 6d1661e23e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,7 +64,7 @@ export const deleteDocuments = async (collection: CollectionBase, documentIds: D
const allResult = await Promise.all(promiseArray); const allResult = await Promise.all(promiseArray);
const flatAllResult = Array.prototype.concat.apply([], allResult); const flatAllResult = Array.prototype.concat.apply([], allResult);
logConsoleInfo(`Successfully deleted ${getEntityName(true)}: ${flatAllResult.length} out of ${nbDocuments}`); logConsoleInfo(`Successfully deleted ${getEntityName(flatAllResult.length > 1)}: ${flatAllResult.length} out of ${nbDocuments}`);
// TODO: handle case result.length != nbDocuments // TODO: handle case result.length != nbDocuments
return flatAllResult; return flatAllResult;
} catch (error) { } catch (error) {