Skip to content

Commit

Permalink
получше реализация PropertyDescriptorCollection.add
Browse files Browse the repository at this point in the history
  • Loading branch information
ColCh committed Feb 4, 2014
1 parent 3824899 commit b953647
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/abstractions.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,7 @@
* @return {!PropertyDescriptor}
*/
PropertyDescriptorCollection.prototype.add = function (propertyName) {
var propertyDescriptor = new PropertyDescriptor(propertyName);
this.push(propertyDescriptor);
return propertyDescriptor;
return this[ this.length ] = new PropertyDescriptor(propertyName);
};

/** @const */
Expand Down

0 comments on commit b953647

Please sign in to comment.