From 673604b374788b674a07c080829cde633f5d27df Mon Sep 17 00:00:00 2001 From: Sam Saccone Date: Tue, 8 Sep 2015 09:26:09 -0700 Subject: [PATCH] :hammer: Harden unwrapping logic. No longer bombs for non-compliant files. --- utils/uniffe.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/uniffe.js b/utils/uniffe.js index da6ccab0..7b67e4ab 100644 --- a/utils/uniffe.js +++ b/utils/uniffe.js @@ -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; }