Skip to content

Commit fd43865

Browse files
committed
Reduce hasData per @gibson042 review notes.
Signed-off-by: Rick Waldron <[email protected]>
1 parent 64630ea commit fd43865

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/data.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,7 @@ Data.prototype = {
130130
hasData: function( owner ) {
131131
var index = Data.index( this.owners, owner );
132132

133-
if ( index > -1 ) {
134-
return !jQuery.isEmptyObject( this.cache[ index ] );
135-
}
136-
return false;
133+
return index !== -1 && jQuery.isEmptyObject( this.cache[ index ] );
137134
},
138135
discard: function( owner ) {
139136
var index = Data.index( this.owners, owner );

0 commit comments

Comments
 (0)