Kylart / MalScraper

Scrape everything you can from MyAnimeList.net
MIT License
177 stars 49 forks source link

[FIX] Fixing the bug #32 bad argument in function #52

Closed JustalK closed 3 years ago

JustalK commented 3 years ago

Hello,

I have fixed the bug describe here : https://github.com/Kylart/MalScraper/issues/21

The error was coming from the callback of getResults in the commit for#32 The number of argument in the callback was wrong after adding the parameter type in the function getResults

const getResults = (type, url, params = {}, maxResult = 50, result = []) => {
...
      const getResults = (url, params = {}, maxResult = 50, result = []) => {
     })
...
})

See here for more details => https://github.com/Kylart/MalScraper/commit/15f45325e083ea6f953fd6c6341f299347a157d5#diff-491054a8b2d040a90c13541f0bbfe5d5

At the same time, I have added an unit test for catching this kind of problem before it get pushed in the master branch.