Skip to content

Commit

Permalink
use @vvo's suggestion to use Object.defineProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
jessetane committed Jan 27, 2014
1 parent 5c76a1c commit b4894be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Expand Up @@ -56,9 +56,9 @@ for (var method in arrayMethods) {
/**
* expose array.length
*/
Queue.prototype.__defineGetter__('length', function() {
return this.pending + this.jobs.length;
});
Object.defineProperty(Queue.prototype, 'length', { get: function() {
return this.pending + this.jobs.length;
}});

/**
* start processing the queue
Expand Down

0 comments on commit b4894be

Please sign in to comment.