Merge pull request #2771 from mempool/simon/fix-javascript-errors-block-nav
Fix for javascript errors when navigating blocks
This commit is contained in:
		
						commit
						729f2aff3e
					
				@ -77,6 +77,8 @@ export class BlockOverviewGraphComponent implements AfterViewInit, OnDestroy, On
 | 
				
			|||||||
      cancelAnimationFrame(this.animationFrameRequest);
 | 
					      cancelAnimationFrame(this.animationFrameRequest);
 | 
				
			||||||
      clearTimeout(this.animationHeartBeat);
 | 
					      clearTimeout(this.animationHeartBeat);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    this.canvas.nativeElement.removeEventListener('webglcontextlost', this.handleContextLost);
 | 
				
			||||||
 | 
					    this.canvas.nativeElement.removeEventListener('webglcontextrestored', this.handleContextRestored);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  clear(direction): void {
 | 
					  clear(direction): void {
 | 
				
			||||||
 | 
				
			|||||||
@ -91,6 +91,9 @@ export class TransactionsListComponent implements OnInit, OnChanges {
 | 
				
			|||||||
            filter(() => this.stateService.env.LIGHTNING),
 | 
					            filter(() => this.stateService.env.LIGHTNING),
 | 
				
			||||||
            switchMap((txIds) => this.apiService.getChannelByTxIds$(txIds)),
 | 
					            switchMap((txIds) => this.apiService.getChannelByTxIds$(txIds)),
 | 
				
			||||||
            tap((channels) => {
 | 
					            tap((channels) => {
 | 
				
			||||||
 | 
					              if (!this.transactions) {
 | 
				
			||||||
 | 
					                return;
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
              const transactions = this.transactions.filter((tx) => !tx._channels);
 | 
					              const transactions = this.transactions.filter((tx) => !tx._channels);
 | 
				
			||||||
              channels.forEach((channel, i) => {
 | 
					              channels.forEach((channel, i) => {
 | 
				
			||||||
                transactions[i]._channels = channel;
 | 
					                transactions[i]._channels = channel;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user