🔨 Harden unwrapping logic.

No longer bombs for non-compliant files.
master
Sam Saccone 2015-09-08 09:26:09 -07:00
parent 3d9b1cbab2
commit 673604b374
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,8 @@ function uniffe(contents) {
escodegen.attachComments(ast, comments, tokens);
if (ast.body[0].expression.callee === undefined) {
if (ast.body[0].expression === undefined ||
ast.body[0].expression.callee === undefined) {
return contents;
}