Permalink
Browse files

Fixes #2287 -- tweak extends to make jshint easier

  • Loading branch information...
1 parent 879fe39 commit 46065199cdf14e2a118b697eefddee9d33c1d591 @jashkenas jashkenas committed Apr 25, 2012
Showing with 5 additions and 4 deletions.
  1. +2 −1 lib/coffee-script/browser.js
  2. +2 −2 lib/coffee-script/nodes.js
  3. +1 −1 src/nodes.coffee
Oops, something went wrong.
Oops, something went wrong.
View
@@ -1949,7 +1949,7 @@ UTILITIES =
# Correctly set up a prototype chain for inheritance, including a reference
# to the superclass for `super()` calls, and copies of any static properties.
extends: -> """
- function(child, parent) { for (var key in parent) { if (#{utility 'hasProp'}.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }
+ function(child, parent) { for (var key in parent) { if (#{utility 'hasProp'}.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }
"""
# Create a function bound to the current value of "this".

0 comments on commit 4606519

Please sign in to comment.