diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2013-02-03 15:31:23 -0500 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2013-02-03 15:31:23 -0500 |
commit | 64630eaf850797f45b523b3eadc9a158e78eb5a8 (patch) | |
tree | 3f2edf6d3cf4c424488052b0d27c5d34615de2a3 /src/data.js | |
parent | 7f94a5cc3a167a710576c008da2c186a98ce2dd4 (diff) | |
download | jquery-64630eaf850797f45b523b3eadc9a158e78eb5a8.tar.gz jquery-64630eaf850797f45b523b3eadc9a158e78eb5a8.zip |
Reduce Data.prototype.add by using the returned length value of this.owners.push(owner)
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Diffstat (limited to 'src/data.js')
-rw-r--r-- | src/data.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/data.js b/src/data.js index 448decd00..054a520f5 100644 --- a/src/data.js +++ b/src/data.js @@ -16,8 +16,7 @@ Data.index = function( array, node ) { Data.prototype = { add: function( owner ) { - this.owners.push( owner ); - return (this.cache[ this.owners.length - 1 ] = {}); + return (this.cache[ this.owners.push( owner ) - 1 ] = {}); }, set: function( owner, data, value ) { var prop, |