shithub: libmujs

Download patch

ref: 6a85c78a5d89503e7e5f0b09b2de9fe2dce7183d
parent: fb32b5c893a0685dceaa2bb72bf64880e0cc4572
author: Tor Andersson <tor.andersson@gmail.com>
date: Tue May 16 09:08:46 EDT 2017

Fix error message when missing stack traces in main.c

--- a/main.c
+++ b/main.c
@@ -122,7 +122,8 @@
 
 static const char *stacktrace_js =
 	"Error.prototype.toString = function() {\n"
-	"return this.name + ': ' + this.message + this.stackTrace;\n"
+	"if (this.stackTrace) return this.name + ': ' + this.message + this.stackTrace;\n"
+	"return this.name + ': ' + this.message;\n"
 	"};\n"
 ;