File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -682,13 +682,22 @@ var inject = function () {
682
682
$provide [ met ] = function ( name , definition ) {
683
683
if ( typeof name === 'object' ) {
684
684
angular . forEach ( name , function ( value , key ) {
685
- name [ key ] = function ( ) {
685
+ var isArray = value instanceof Array ;
686
+ var originalValue = isArray ? value [ value . length - 1 ] : value ;
687
+
688
+ var newValue = function ( ) {
686
689
debug . deps . push ( {
687
690
name : key ,
688
- imports : annotate ( value )
691
+ imports : annotate ( originalValue )
689
692
} ) ;
690
- return value . apply ( this , arguments ) ;
693
+ return originalValue . apply ( this , arguments ) ;
691
694
} ;
695
+
696
+ if ( isArray ) {
697
+ value [ value . length - 1 ] = newValue ;
698
+ } else {
699
+ name [ value ] = newValue ;
700
+ }
692
701
} ) ;
693
702
} else {
694
703
debug . deps . push ( {
You can’t perform that action at this time.
0 commit comments