🔨 Harden unwrapping logic.

No longer bombs for non-compliant files.
This commit is contained in:
Sam Saccone 2015-09-08 09:26:09 -07:00
parent 3d9b1cbab2
commit 673604b374

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;
}