Reduce hasData per @gibson042 review notes.

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
Rick Waldron 2013-02-03 17:55:28 -05:00
parent 64630eaf85
commit fd43865c6d

View 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 );