File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 91
91
angular . forEach ( data . files , function ( file ) {
92
92
filesCopy . push ( file ) ;
93
93
} ) ;
94
- scope . $apply ( function ( ) {
94
+ scope . $parent . $applyAsync ( function ( ) {
95
95
addFileMethods ( scope , data ) ;
96
96
var method = scope . option ( 'prependFiles' ) ?
97
97
'unshift' : 'push' ;
100
100
data . process ( function ( ) {
101
101
return scope . process ( data ) ;
102
102
} ) . always ( function ( ) {
103
- scope . $apply ( function ( ) {
103
+ scope . $parent . $applyAsync ( function ( ) {
104
104
addFileMethods ( scope , data ) ;
105
105
scope . replace ( filesCopy , data . files ) ;
106
106
} ) ;
320
320
'fileuploadprocessalways' ,
321
321
'fileuploadprocessstop'
322
322
] . join ( ' ' ) , function ( e , data ) {
323
- if ( $scope . $emit ( e . type , data ) . defaultPrevented ) {
324
- e . preventDefault ( ) ;
325
- }
323
+ $scope . $parent . $applyAsync ( function ( ) {
324
+ if ( $scope . $emit ( e . type , data ) . defaultPrevented ) {
325
+ e . preventDefault ( ) ;
326
+ }
327
+ } ) ;
326
328
} ) . on ( 'remove' , function ( ) {
327
329
// Remove upload methods from the scope,
328
330
// when the widget is removed:
You can’t perform that action at this time.
0 commit comments