Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed inheritance typo

  • Loading branch information...
commit 00c4fa59f050b1ae78b28c83fdef63fd29ffa5bd 1 parent 50cebe8
@tj tj authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 support/compile.js
View
4 support/compile.js
@@ -41,9 +41,9 @@ function parse(js) {
function parseInheritance(js) {
return js
- .replace(/^ *(\w+)\.prototype\.__proto__ * = *(\w+)/gm, function(_, child, parent){
+ .replace(/^ *(\w+)\.prototype\.__proto__ * = *(\w+)\.prototype *;?/gm, function(_, child, parent){
return child + '.prototype = new ' + parent + ';\n'
- + child + '.prototype.constructor = '+ child + '\n';
+ + child + '.prototype.constructor = '+ child + ';\n';
});
}
Please sign in to comment.
Something went wrong with that request. Please try again.