Open wxfred opened 6 months ago
I want to re-run a job by getting the index of the job in the queue and insert it behind itself, so i did this below, but the index is -1
taskQueue.addEventListener('success', event => { const { result, job } = event.detail const index = taskQueue.indexOf(job) console.log(index) // always return -1 if (result[0] === 'repeat job') taskQueue.splice(index, 0, job) })
I want to re-run a job by getting the index of the job in the queue and insert it behind itself, so i did this below, but the index is -1