From: Rick Waldron Date: Sun, 3 Feb 2013 20:31:23 +0000 (-0500) Subject: Reduce Data.prototype.add by using the returned length value of this.owners.push... X-Git-Tag: 2.0.0b2~43 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=64630eaf850797f45b523b3eadc9a158e78eb5a8;p=jquery.git Reduce Data.prototype.add by using the returned length value of this.owners.push(owner) Signed-off-by: Rick Waldron --- 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,