From 7de01991a0d4d2d292b429b74f35929ca68f228e Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Wed, 26 Feb 2020 18:20:14 +0000 Subject: [PATCH] Fix the problem that all chapters (regardless of selections) will be posted to the API --- public/js/download.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/download.js b/public/js/download.js index 896eab9..c9ee07c 100644 --- a/public/js/download.js +++ b/public/js/download.js @@ -29,7 +29,7 @@ const download = () => { const ids = selected.map((i, e) => { return $(e).find('td').first().text(); }).get(); - const chapters = globalChapters.filter(c => ids.indexOf(c.id)); + const chapters = globalChapters.filter(c => ids.indexOf(c.id) >= 0); console.log(ids); $.ajax({ type: 'POST',