Fix the problem that all chapters (regardless of selections) will be

posted to the API
This commit is contained in:
Alex Ling 2020-02-26 18:20:14 +00:00
parent 319967438b
commit 7de01991a0

View File

@ -29,7 +29,7 @@ const download = () => {
const ids = selected.map((i, e) => { const ids = selected.map((i, e) => {
return $(e).find('td').first().text(); return $(e).find('td').first().text();
}).get(); }).get();
const chapters = globalChapters.filter(c => ids.indexOf(c.id)); const chapters = globalChapters.filter(c => ids.indexOf(c.id) >= 0);
console.log(ids); console.log(ids);
$.ajax({ $.ajax({
type: 'POST', type: 'POST',