Make sure blocks list rxjs observable triggers at least once

This commit is contained in:
nymkappa 2022-06-05 17:33:23 +02:00
parent 412f118d22
commit 33e0859847
No known key found for this signature in database
GPG key ID: E155910B16E8BD04

View file

@ -80,7 +80,7 @@ export class BlocksList implements OnInit {
this.stateService.blocks$ this.stateService.blocks$
.pipe( .pipe(
switchMap((block) => { switchMap((block) => {
if (block[0].height <= this.lastBlockHeight) { if (block[0].height < this.lastBlockHeight) {
return []; // Return an empty stream so the last pipe is not executed return []; // Return an empty stream so the last pipe is not executed
} }
this.lastBlockHeight = block[0].height; this.lastBlockHeight = block[0].height;