浏览代码

keep existing $hxClasses

Nicolas Cannasse 14 年之前
父节点
当前提交
c69f737c65
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      genjs.ml

+ 1 - 1
genjs.ml

@@ -824,7 +824,7 @@ let generate com =
 	| Some g -> g()
 	| None ->
 	let ctx = alloc_ctx com in
-	print ctx "var $_, $hxClasses = {}, $estr = function() { return js.Boot.__string_rec(this,''); }
+	print ctx "var $_, $hxClasses = $hxClasses || {}, $estr = function() { return js.Boot.__string_rec(this,''); }
 function $extend(from, fields) {
 	function inherit() {}; inherit.prototype = from; var proto = new inherit();
 	for (var name in fields) proto[name] = fields[name];