Skip to content
Permalink
Browse files

Reduce Data.prototype.add by using the returned length value of this.…

…owners.push(owner)

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information
rwaldron committed Feb 3, 2013
1 parent 7f94a5c commit 64630eaf850797f45b523b3eadc9a158e78eb5a8
Showing with 1 addition and 2 deletions.
  1. +1 −2 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,

0 comments on commit 64630ea

Please sign in to comment.
You can’t perform that action at this time.