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:
@ -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':
|
||||
|
Reference in New Issue
Block a user