mirror of
https://github.com/hackku21/loc-chain-backend.git
synced 2024-10-27 20:34:03 +00:00
Account for null chain from database
This commit is contained in:
parent
b68c961046
commit
8745dc8b2b
@ -190,7 +190,7 @@ export class Blockchain extends Unit {
|
||||
|
||||
this.logging.debug({peers, chain})
|
||||
|
||||
this.approvedChain = chain.map((item: BlockResourceItem) => new Block(item))
|
||||
this.approvedChain = (chain || []).map((item: BlockResourceItem) => new Block(item))
|
||||
this.peers = peers || []
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user