Browse Source

Fix trace without PosInfos

Pascal Peridont 19 years ago
parent
commit
3d10928db7
1 changed files with 3 additions and 1 deletions
  1. 3 1
      std/js/Boot.hx

+ 3 - 1
std/js/Boot.hx

@@ -32,7 +32,9 @@ class Boot {
 
 	private static function __trace(v,i) {
 		untyped {
-			var msg = i.fileName+":"+i.lineNumber+": "+__unhtml(__string_rec(v,""))+"<br/>";
+			var msg = if( i != null ) i.fileName+":"+i.lineNumber+": " else "";
+			msg += __unhtml(__string_rec(v,""))+"<br/>";
+
 			var d = document.getElementById("haxe:trace");
 			if( d == null )
 				alert("No haxe:trace element defined\n"+msg);