]> source.dussan.org Git - jquery.git/commitdiff
Reduce hasData per @gibson042 review notes.
authorRick Waldron <waldron.rick@gmail.com>
Sun, 3 Feb 2013 22:55:28 +0000 (17:55 -0500)
committerRick Waldron <waldron.rick@gmail.com>
Sun, 3 Feb 2013 22:55:28 +0000 (17:55 -0500)
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
src/data.js

index 054a520f59a3da87493e0a722a412bedd72f8391..ecae5649f4d7ae6b17c4d55379c0e32a42258ec9 100644 (file)
@@ -130,10 +130,7 @@ Data.prototype = {
        hasData: function( owner ) {
                var index = Data.index( this.owners, owner );
 
-               if ( index > -1 ) {
-                       return !jQuery.isEmptyObject( this.cache[ index ] );
-               }
-               return false;
+               return index !== -1 && jQuery.isEmptyObject( this.cache[ index ] );
        },
        discard: function( owner ) {
                var index = Data.index( this.owners, owner );