Fix blocks list observable

This commit is contained in:
Mononaut 2023-07-20 17:30:26 +09:00
parent e066bb1e9d
commit 943dc6f5e6
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E

View File

@ -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 null; // 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);
}) })
) )
]) ])