Skip to content

Commit

Permalink
$.fn.filter fix
Browse files Browse the repository at this point in the history
Issue #100
  • Loading branch information
shshaw committed Apr 18, 2016
1 parent de55971 commit 54ef956
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cash",
"main": "dist/cash.js",
"version": "1.2.0",
"version": "1.2.1",
"homepage": "https://github.com/kenwheeler/cash",
"authors": [
"Ken Wheeler <[email protected]>"
Expand Down
4 changes: 2 additions & 2 deletions dist/cash.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,9 @@
},

filter: function (selector) {
return filter.call(this, (isString(selector) ? function (e) {
return cash(filter.call(this, (isString(selector) ? function (e) {
return matches(e, selector);
} : selector));
} : selector)));
},

first: function () {
Expand Down
2 changes: 1 addition & 1 deletion dist/cash.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cash-dom",
"version": "1.2.0",
"version": "1.2.1",
"description": "An absurdly small jQuery alternative for modern browsers.",
"main": "./dist/cash.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn.extend({
},

filter(selector) {
return filter.call(this, ( isString(selector) ? e => matches(e, selector) : selector ));
return cash(filter.call(this, ( isString(selector) ? e => matches(e, selector) : selector )));
},

first() {
Expand Down

1 comment on commit 54ef956

@shshaw
Copy link
Collaborator Author

@shshaw shshaw commented on 54ef956 Apr 18, 2016

Choose a reason for hiding this comment

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

Fix for arrays of elements being returned instead of collections. Affected $.fn.children and $.fn.filter in particular.

Please sign in to comment.