1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-05-15 22:59:41 +02:00

fix typescript compilation

This commit is contained in:
Kushagra Gour 2017-01-18 04:23:04 +05:30
parent 758e91df31
commit 80b8da075c

View File

@ -557,13 +557,19 @@ settingsBtn, onboardModal, notificationsBtn, onboardShowInTabOptionBtn, onboardD
/* eslint-disable no-throw-literal */
throw ({ description: code.diagnostics[0].messageText, lineNumber: ts.getLineOfLocalPosition(code.diagnostics[0].file,code.diagnostics[0].start) });
}
try {
ast = esprima.parse(code.outputText, {
tolerant: true,
jsx: true
});
} finally {
if (shouldPreventInfiniteLoops !== false) {
utils.addInfiniteLoopProtection(ast);
}
d.resolve(escodegen.generate(ast));
}
} catch (e) {
showErrors('js', [ { lineNumber: e.lineNumber - 1, message: e.description } ]);
} finally {
if (shouldPreventInfiniteLoops !== false) {
// utils.addInfiniteLoopProtection(ast);
}
d.resolve(code.outputText);
}
}