Skip to content

Conversation

@fb55
Copy link
Member

@fb55 fb55 commented Feb 11, 2021

Continuation of #1708, fixing up untilNodes for {prev,next}Until.

Continuation of #1708, fixing up `untilNodes` for `{prev,next}Until`.
@fb55 fb55 requested a review from 5saviahv February 11, 2021 02:47
}
}, this);

return this._make(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this to match the pattern of most other functions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, yes you are correct other traversing functions use filter function like that.

@fb55
Copy link
Member Author

fb55 commented Feb 11, 2021

@5saviahv I know that #1662 is still open (which would fix all similar issues), but this seems worth its own fix.

Copy link
Contributor

@5saviahv 5saviahv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I thought those functions should also be updated.

}
}, this);

return this._make(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, yes you are correct other traversing functions use filter function like that.


if (typeof selector === 'string') {
untilNode = select.select(selector, this.nextAll().get(), this.options)[0];
untilNodes = this.nextAll(selector).toArray();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice


if (typeof selector === 'string') {
untilNode = select.select(selector, this.prevAll().get(), this.options)[0];
untilNodes = this.prevAll(selector).toArray();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants