Skip to content
This repository was archived by the owner on Dec 3, 2023. It is now read-only.

Commit 300276a

Browse files
committed
Merge pull request #12 from ackwell/patch-1
Added sanity check to 3-argument module call.
2 parents 41917f8 + 044a5ba commit 300276a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ AngularPlugin.prototype = {
197197
var mod = parser.evaluateExpression(expr.arguments[0]);
198198
var deps = parser.evaluateExpression(expr.arguments[1]);
199199
this._addModuleDefinition(parser, expr, mod);
200+
// Some libraries, such as angular-classy, will break compilation without this check
201+
if( !deps.items ){
202+
return true;
203+
}
200204
return deps.items.every(
201205
this._addDependency.bind(this, parser, expr));
202206
},

0 commit comments

Comments
 (0)