-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(traversing): Fix filter for {prev,next}Until
#1728
Conversation
Continuation of #1708, fixing up `untilNodes` for `{prev,next}Until`.
@@ -181,9 +181,9 @@ exports.parentsUntil = function (selector, filter) { | |||
} | |||
}, this); | |||
|
|||
return this._make( |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
@@ -181,9 +181,9 @@ exports.parentsUntil = function (selector, filter) { | |||
} | |||
}, this); | |||
|
|||
return this._make( |
There was a problem hiding this comment.
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.
@@ -314,7 +314,7 @@ exports.nextUntil = function (selector, filterSelector) { | |||
var untilNodes; | |||
|
|||
if (typeof selector === 'string') { | |||
untilNode = select.select(selector, this.nextAll().get(), this.options)[0]; | |||
untilNodes = this.nextAll(selector).toArray(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
@@ -432,7 +432,7 @@ exports.prevUntil = function (selector, filterSelector) { | |||
var untilNodes; | |||
|
|||
if (typeof selector === 'string') { | |||
untilNode = select.select(selector, this.prevAll().get(), this.options)[0]; | |||
untilNodes = this.prevAll(selector).toArray(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
Continuation of #1708, fixing up
untilNodes
for{prev,next}Until
.