diff options
author | Oleg Gaidarenko <markelog@gmail.com> | 2016-07-15 21:42:25 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-15 21:42:25 +0400 |
commit | e4fd41f8fa4190fbbb6cb98cf7ace64f6e00685d (patch) | |
tree | c9957f8e6da0b814dfd11a5d1d61d969f7be4efd /src/traversing/findFilter.js | |
parent | 96966c022079e3956018717136367fbf4ed548a2 (diff) | |
download | jquery-e4fd41f8fa4190fbbb6cb98cf7ace64f6e00685d.tar.gz jquery-e4fd41f8fa4190fbbb6cb98cf7ace64f6e00685d.zip |
Build: Update eslint config and fix associated errors
Diffstat (limited to 'src/traversing/findFilter.js')
-rw-r--r-- | src/traversing/findFilter.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/traversing/findFilter.js b/src/traversing/findFilter.js index c742fb5c3..92d6753b4 100644 --- a/src/traversing/findFilter.js +++ b/src/traversing/findFilter.js @@ -45,11 +45,13 @@ jQuery.filter = function( expr, elems, not ) { expr = ":not(" + expr + ")"; } - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); + if ( elems.length === 1 && elem.nodeType === 1 ) { + return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; + } + + return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); }; jQuery.fn.extend( { |