Skip to content

Commit

Permalink
Update Class.js
Browse files Browse the repository at this point in the history
  • Loading branch information
wizard04wsu authored Feb 27, 2019
1 parent a9728cf commit 2b826f2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Class.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@

protoToString = function toString(){ return "[instance of "+className+"]"; };
}
else{
else if(this.name !== (void 0) && /^[a-z_$][a-z0-9_$]*$/i.test(this.name)){
//use the name of the parent class
className = this.name;
}
else{
className = "Class";
}


/*** create the new constructor ***/
Expand Down

0 comments on commit 2b826f2

Please sign in to comment.