aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRick Waldron <waldron.rick@gmail.com>2013-02-03 17:55:28 -0500
committerRick Waldron <waldron.rick@gmail.com>2013-02-03 17:55:28 -0500
commitfd43865c6d11a8901b2780a57418f652143f250a (patch)
tree888c960d8b1b714cdb41f7052d0ef1b1d2728d45 /src
parent64630eaf850797f45b523b3eadc9a158e78eb5a8 (diff)
downloadjquery-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.js5
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 );