From e4cd1eabe58b855e74f80908f360cc3a25d0af86 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Tue, 6 Dec 2011 18:20:41 -0500 Subject: [PATCH] Fixed issue with minified files in IE Ah - you have to love those "ah-ha!" moments. The issue here is that both uglify-js and closure compiler mangled the names in such a way that the var and the function name had different values. In the case of closure compiler, the function name was used to instantiate the constructor if the 'new' keyword was omitted. This worked fine in all other tested browsers, but IE handles it differently. --- lib/ClassBuilder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ClassBuilder.js b/lib/ClassBuilder.js index 71005be..f5f2ec1 100644 --- a/lib/ClassBuilder.js +++ b/lib/ClassBuilder.js @@ -603,7 +603,7 @@ exports.prototype.createConcreteCtor = function( cname, members ) // constructor function to be returned (the name is set to ClassInstance // because some debuggers (e.g. v8) will show the name of this function for // constructor instances rather than invoking the toString() method) - var ClassInstance = function ClassInstance() + function ClassInstance() { if ( !( this instanceof ClassInstance ) ) {