@@ -26,7 +26,6 @@ declare var CodeMirror: any;
2626 changeDetection : ChangeDetectionStrategy . OnPush
2727} )
2828@AutoUnsubscribe ( )
29-
3029export class WorkflowNodeRunParamComponent implements AfterViewInit {
3130 @ViewChild ( 'runWithParamModal' )
3231 runWithParamModal : ModalTemplate < boolean , boolean , void > ;
@@ -104,7 +103,7 @@ export class WorkflowNodeRunParamComponent implements AfterViewInit {
104103 this . currentNodeRun = this . _store . selectSnapshot ( WorkflowState . nodeRunSnapshot ) ;
105104 this . currentWorkflowRun = this . _store . selectSnapshot ( WorkflowState . workflowRunSnapshot ) ;
106105 this . workflow = this . _store . selectSnapshot ( WorkflowState . workflowSnapshot ) ;
107- this . projectKey = this . _store . selectSnapshot ( ProjectState . projectSnapshot ) . key ;
106+ this . projectKey = this . _store . selectSnapshot ( ProjectState . projectSnapshot ) . key ;
108107
109108 if ( this . currentNodeRun && this . currentNodeRun . workflow_node_id !== this . nodeToRun . id ) {
110109 delete this . currentNodeRun ;
@@ -124,7 +123,11 @@ export class WorkflowNodeRunParamComponent implements AfterViewInit {
124123 }
125124 }
126125
127- this . linkedToRepo = WNode . linkedToRepo ( this . nodeToRun , this . workflow ) ;
126+ if ( this . currentWorkflowRun && this . currentWorkflowRun . workflow ) {
127+ this . linkedToRepo = WNode . linkedToRepo ( this . nodeToRun , this . currentWorkflowRun . workflow ) ;
128+ } else {
129+ this . linkedToRepo = WNode . linkedToRepo ( this . nodeToRun , this . workflow ) ;
130+ }
128131
129132 let num : number ;
130133 let nodeRunID : number ;
@@ -221,7 +224,7 @@ export class WorkflowNodeRunParamComponent implements AfterViewInit {
221224 . pipe ( first ( ) , finalize ( ( ) => this . _cd . markForCheck ( ) ) )
222225 . subscribe ( n => {
223226 this . lastNum = n . num + 1 ;
224- this . getCommits ( n . num + 1 , false ) ;
227+ this . getCommits ( n . num + 1 , false ) ;
225228 } ) ;
226229 } else {
227230 this . getCommits ( this . num , false ) ;
@@ -433,7 +436,7 @@ export class WorkflowNodeRunParamComponent implements AfterViewInit {
433436 this . refreshVCSInfos ( this . payloadRemote ) ;
434437 }
435438
436- this . getCommits ( num || this . lastNum , true ) ;
439+ this . getCommits ( num || this . lastNum , true ) ;
437440 } ) ;
438441 }
439442 }
0 commit comments