Commit 64630eaf authored by Rick Waldron's avatar Rick Waldron

Reduce Data.prototype.add by using the returned length value of this.owners.push(owner)

Signed-off-by: 's avatarRick Waldron <waldron.rick@gmail.com>
parent 7f94a5cc
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment