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

minor fixes.

This commit is contained in:
Kushagra Gour
2016-11-16 13:14:51 +05:30
parent 05894131a5
commit e0a5335e5d
3 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,7 @@
* @param {ASTBody} Body of an AST generated by esprima or any ES compliant AST
*/
function addInfiniteLoopProtection(astBody) {
if (!astBody) return;
if (!Array.isArray(astBody)) {
addInfiniteLoopProtection(astBody.body);
return;