File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 5656 switch ( rejection . status ) {
5757 case 401 :
5858 var deferred = $q . defer ( ) ;
59- httpBuffer . append ( config , deferred ) ;
60- $rootScope . $broadcast ( 'event:auth-loginRequired' , rejection ) ;
59+ var bufferLength = httpBuffer . append ( config , deferred ) ;
60+ if ( bufferLength === 1 )
61+ $rootScope . $broadcast ( 'event:auth-loginRequired' , rejection ) ;
6162 return deferred . promise ;
6263 case 403 :
6364 $rootScope . $broadcast ( 'event:auth-forbidden' , rejection ) ;
9798 return {
9899 /**
99100 * Appends HTTP request configuration object with deferred response attached to buffer.
101+ * @return {Number } The new length of the buffer.
100102 */
101103 append : function ( config , deferred ) {
102- buffer . push ( {
104+ return buffer . push ( {
103105 config : config ,
104106 deferred : deferred
105107 } ) ;
You can’t perform that action at this time.
0 commit comments