matthewmueller / x-ray

The next web scraper. See through the <html> noise.
MIT License
5.88k stars 350 forks source link

Fix potential issue when selector is a function following comments on… #102

Closed dfdeagle47 closed 8 years ago

dfdeagle47 commented 9 years ago

… commit e7318d591908d04b439c1ff7e93ff9c4b63a89af

When the selector v is a function, the function next() will most likely be called twice: once because there is no return before calling the function v, and once again when the callback for v is called.

As @bdentino notes, this could cause problems down the line because the next() is called too many times.

matthewmueller commented 8 years ago

okay thanks a lot!