Skip to content

Commit

Permalink
fix typescript compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
chinchang committed Jan 17, 2017
1 parent 758e91d commit 80b8da0
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 80b8da0

Please sign in to comment.