Skip to content

Commit 05338b8

Browse files
5saviahvfb55
andauthored
Update lib/api/traversing.js
Nice, I didn't know I can use while element like so Co-authored-by: Felix Böhm <[email protected]>
1 parent 17ce4c4 commit 05338b8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/api/traversing.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,7 @@ exports.closest = function (selector) {
262262
* @returns {Cheerio} The next nodes.
263263
*/
264264
exports.next = _matcher(function (elem) {
265-
// eslint-disable-next-line no-empty
266-
while ((elem = elem.next) && !isTag(elem)) {}
265+
while ((elem = elem.next) && !isTag(elem));
267266
return elem;
268267
});
269268

0 commit comments

Comments
 (0)