duplicate input contacts
This commit is contained in:
+2
-1
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user