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

Commit 044a5ba

Browse files
committed
Added sanity check to 3-argument module call.
1 parent e27c97d commit 044a5ba

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)