From fd43865c6d11a8901b2780a57418f652143f250a Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Sun, 3 Feb 2013 17:55:28 -0500 Subject: [PATCH] Reduce hasData per @gibson042 review notes. Signed-off-by: Rick Waldron --- src/data.js | 5 +---- 1 file changed, 1 insertion(+), 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 ); -- 2.39.5