duplicate input contacts

This commit is contained in:
2022-11-04 09:10:11 +01:00
parent c79c45db8a
commit dbf36405df
+2 -1
View File
@@ -78,7 +78,8 @@ async function startBook(contactPojo, device, selectedStore, audioAnalyse, alert
} }
async function startWithList(contacts, device, selectedStore, audioAnalyse, alertBeep) { async function startWithList(contacts, device, selectedStore, audioAnalyse, alertBeep) {
await contacts.reduce(async (promise, contactPojo) => { let duplicatedList = [].concat(contacts).concat(contacts)
await duplicatedList.reduce(async (promise, contactPojo) => {
// This line will wait for the last async function to finish. // This line will wait for the last async function to finish.
// The first iteration uses an already resolved Promise // The first iteration uses an already resolved Promise
// so, it will immediately continue. // so, it will immediately continue.