Browse Source

[js] don't try to run Error.captureStackTrace if it's not present

Dan Korostelev 10 years ago
parent
commit
a32cf3633e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      std/js/Boot.hx

+ 1 - 1
std/js/Boot.hx

@@ -28,7 +28,7 @@ private class HaxeError extends js.Error {
 	public function new(val:Dynamic) {
 		super();
 		this.val = untyped __define_feature__("js.Boot.HaxeError", val);
-		untyped js.Error.captureStackTrace(this, HaxeError);
+		untyped if (js.Error.captureStackTrace) js.Error.captureStackTrace(this, HaxeError);
 	}
 }