We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5c8f65 commit 9afd839Copy full SHA for 9afd839
src/index.js
@@ -32,7 +32,13 @@ export function compile(code) {
32
const ast = parser.parse();
33
const compiler = new CompilerJS(stdEnv(ast));
34
const js = makeCompilerEnv() + compiler.compile();
35
- return UglifyJS.minify(js).code;
+
36
+ const uglified = UglifyJS.minify(js);
37
+ if (uglified.error) {
38
+ throw EvalError(`Comppiling Error: ${uglified.error}`);
39
+ } else {
40
+ return uglified.code;
41
+ }
42
}
43
44
export function runJS(jsCode) {
0 commit comments