Fix random console errors on block loading

This commit is contained in:
natsoni
2024-04-01 18:00:10 +09:00
parent 56b9715fc5
commit 3f80dbc5ce
3 changed files with 12 additions and 12 deletions

View File

@@ -154,7 +154,7 @@ export class TransactionsListComponent implements OnInit, OnChanges {
});
} else {
this.priceService.getBlockPrice$(this.blockTime, true, this.currency).pipe(
tap((price) => this.transactions.forEach((tx) => tx['price'] = price)),
tap((price) => this.transactions?.forEach((tx) => tx['price'] = price)),
).subscribe();
}
}
@@ -239,7 +239,7 @@ export class TransactionsListComponent implements OnInit, OnChanges {
if (this.blockTime && this.transactions?.length && this.currency) {
this.priceService.getBlockPrice$(this.blockTime, true, this.currency).pipe(
tap((price) => this.transactions.forEach((tx) => tx['price'] = price)),
tap((price) => this.transactions?.forEach((tx) => tx['price'] = price)),
).subscribe();
}
const txIds = this.transactions.filter((tx) => !tx._outspends).map((tx) => tx.txid);