Skip to content

Commit

Permalink
Fix #780 by changing options context in '.find()'
Browse files Browse the repository at this point in the history
The issue, after upgrading css-select to v1.2.0, was due to an improper
context of options passed to 'CSSselect()'.
  • Loading branch information
fb55 authored and Delgan committed Jan 2, 2016
1 parent 8dc1cc9 commit 4779762
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/api/traversing.js
Expand Up @@ -29,7 +29,9 @@ exports.find = function(selectorOrHaystack) {
}, this));
}

return this._make(select(selectorOrHaystack, elems, this.options));
var options = {__proto__: this.options, context: this.toArray()};

return this._make(select(selectorOrHaystack, elems, options));
};

// Get the parent of each element in the current set of matched elements,
Expand Down

0 comments on commit 4779762

Please sign in to comment.