File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -226,24 +226,22 @@ function followBranch (instancesKey) {
226226 var newContextVersionId = req . jsonNewBuild . contextVersions [ 0 ] ;
227227 var newBuildId = req . jsonNewBuild . _id ;
228228 var oldContextVersion = find ( req . newContextVersionIds , function ( val ) {
229- return val === newContextVersionId ;
229+ return val === newContextVersionId ;
230230 } ) ;
231- if ( ! oldContextVersion ) {
232- req . newContextVersionIds . push ( newContextVersionId ) ;
233- }
234- req . instanceIds . push ( req . instance . _id . toString ( ) ) ;
235231 var infoObject = {
236232 instance : req . instance ,
237233 buildId : newBuildId ,
238234 targetUrl : req . targetUrl ,
239235 instanceCreator : req . instanceCreator
240236 } ;
241- if ( req . contextVersionNewInfo [ newContextVersionId ] ) {
242- req . contextVersionNewInfo [ newContextVersionId ] . push ( infoObject ) ;
237+ if ( ! oldContextVersion ) {
238+ req . newContextVersionIds . push ( newContextVersionId ) ;
239+ req . contextVersionNewInfo [ newContextVersionId ] = [ infoObject ] ;
243240 }
244241 else {
245- req . contextVersionNewInfo [ newContextVersionId ] = [ infoObject ] ;
242+ req . contextVersionNewInfo [ newContextVersionId ] . push ( infoObject ) ;
246243 }
244+ req . instanceIds . push ( req . instance . _id . toString ( ) ) ;
247245 }
248246 next ( ) ;
249247 }
You can’t perform that action at this time.
0 commit comments