Index: branches/RL2/extensions/Gadgets/modules/ext.gadgets.api.js |
— | — | @@ -91,7 +91,7 @@ |
92 | 92 | * @param error function( error ), called if one of the getter calls called its error callback |
93 | 93 | */ |
94 | 94 | function mergeRepositoryData( getter, success, error ) { |
95 | | - var combined = {}, successes = 0, numRepos = 0, repo; |
| 95 | + var combined = {}, successes = 0, numRepos = 0, repo, failed = false; |
96 | 96 | // Find out how many repos there are |
97 | 97 | // Needs to be in a separate loop because we have to have the final number ready |
98 | 98 | // before we fire the first potentially (since it could be cached) async request |
— | — | @@ -109,7 +109,10 @@ |
110 | 110 | success( combined ); |
111 | 111 | } |
112 | 112 | }, function( errorCode ) { |
113 | | - error( errorCode ); |
| 113 | + if ( !failed ) { |
| 114 | + failed = true; |
| 115 | + error( errorCode ); |
| 116 | + } |
114 | 117 | }, repoName |
115 | 118 | ); |
116 | 119 | } ); |