Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 67c11b9

Browse files
committed
fix($injector): check if a fn is an array explicitly
This change makes the code easier to read and also fixes a compatibility issue with opal.js which pollutes the global state by setting $inject property on Array prototype Closes #7904 Closes #2653
1 parent 5a306b7 commit 67c11b9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/auto/injector.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -762,8 +762,7 @@ function createInjector(modulesToLoad) {
762762
: getService(key)
763763
);
764764
}
765-
if (!fn.$inject) {
766-
// this means that we must be an array.
765+
if (isArray(fn)) {
767766
fn = fn[length];
768767
}
769768

0 commit comments

Comments
 (0)