1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-14 02:26:20 +02:00

fix loop protection for ts and es6 code

This commit is contained in:
Kushagra Gour
2017-04-02 15:08:41 +05:30
parent 51d7bfbf6f
commit 699e835204
2 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@
var varStr = 'var %d = Date.now();\n'
var checkStr = '\nif (Date.now() - %d > 1000) { window.top.previewException(new Error("Infinite loop")); break;}\n'
esprima.parse(code, { tolerant: true, range: true }, function (node) {
esprima.parse(code, { tolerant: true, range: true, jsx: true }, function (node) {
switch (node.type) {
case 'DoWhileStatement':
case 'ForStatement':