Parcourir la source

bugfix when 2 times Boot.__init__

Nicolas Cannasse il y a 15 ans
Parent
commit
980cae6899
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      std/js/Boot.hx

+ 2 - 1
std/js/Boot.hx

@@ -234,7 +234,8 @@ package js;
 					}
 				}
 			};
-			String.prototype.cca = String.prototype.charCodeAt;
+			if( String.prototype.cca == null )
+				String.prototype.cca = String.prototype.charCodeAt;
 			String.prototype.charCodeAt = function(i) {
 				var x = this.cca(i);
 				if( x != x ) // fast isNaN