Skip to content

Commit

Permalink
Fix .constructor on util.inherits
Browse files Browse the repository at this point in the history
  • Loading branch information
5long committed Nov 20, 2010
1 parent 75d7dd7 commit b2b4a54
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ var util = module.exports = {
return dest
}
, inherits: function(klass, super) {
klass.prototype = Object.create(super.prototype)
klass.prototype = Object.create(super.prototype, {
constructor: {
value: klass
, enumerable: false
}
})
}
, def: function(dest, source) {
if (arguments.length < 2) throw TypeError("Wrong number of arguments")
Expand Down

0 comments on commit b2b4a54

Please sign in to comment.