diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2013-02-03 17:55:28 -0500 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2013-02-03 17:55:28 -0500 |
commit | fd43865c6d11a8901b2780a57418f652143f250a (patch) | |
tree | 888c960d8b1b714cdb41f7052d0ef1b1d2728d45 /src | |
parent | 64630eaf850797f45b523b3eadc9a158e78eb5a8 (diff) | |
download | jquery-fd43865c6d11a8901b2780a57418f652143f250a.tar.gz jquery-fd43865c6d11a8901b2780a57418f652143f250a.zip |
Reduce hasData per @gibson042 review notes.
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/data.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/data.js b/src/data.js index 054a520f5..ecae5649f 100644 --- a/src/data.js +++ b/src/data.js @@ -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 ); |