aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.js
diff options
context:
space:
mode:
authorRick Waldron <waldron.rick@gmail.com>2013-02-03 15:31:23 -0500
committerRick Waldron <waldron.rick@gmail.com>2013-02-03 15:31:23 -0500
commit64630eaf850797f45b523b3eadc9a158e78eb5a8 (patch)
tree3f2edf6d3cf4c424488052b0d27c5d34615de2a3 /src/data.js
parent7f94a5cc3a167a710576c008da2c186a98ce2dd4 (diff)
downloadjquery-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.js3
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,