Merge pull request #4014 from mempool/mononaut/fix-blocks-list
Fix blocks list observable
This commit is contained in:
		
						commit
						141ab8076f
					
				@ -84,10 +84,10 @@ export class BlocksList implements OnInit {
 | 
				
			|||||||
        .pipe(
 | 
					        .pipe(
 | 
				
			||||||
          switchMap((blocks) => {
 | 
					          switchMap((blocks) => {
 | 
				
			||||||
            if (blocks[0].height <= this.lastBlockHeight) {
 | 
					            if (blocks[0].height <= this.lastBlockHeight) {
 | 
				
			||||||
              return [null]; // Return an empty stream so the last pipe is not executed
 | 
					              return of([]); // Return an empty stream so the last pipe is not executed
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            this.lastBlockHeight = blocks[0].height;
 | 
					            this.lastBlockHeight = blocks[0].height;
 | 
				
			||||||
            return blocks;
 | 
					            return of(blocks);
 | 
				
			||||||
          })
 | 
					          })
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
    ])
 | 
					    ])
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user