Skip to content

Commit

Permalink
$.fn.filter fix
Browse files Browse the repository at this point in the history
Fix for arrays of elements being returned instead of collections. Affected $.fn.children and $.fn.filter in particular.
  • Loading branch information
shshaw committed Apr 25, 2016
2 parents b5c21b5 + b73e55f commit 2d1b0f4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 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
6 changes: 3 additions & 3 deletions dist/cash.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

/*! cash-dom 1.2.0, https://github.com/kenwheeler/cash @license MIT */
/*! cash-dom 1.2.1, https://github.com/kenwheeler/cash @license MIT */
(function (root, factory) {
if (typeof define === "function" && define.amd) {
define(factory);
Expand Down 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
4 changes: 2 additions & 2 deletions 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

0 comments on commit 2d1b0f4

Please sign in to comment.