fix: check the type of supported_nips
This commit is contained in:
parent
f5f34e31fa
commit
a91eaf668b
1 changed files with 5 additions and 0 deletions
|
|
@ -185,6 +185,11 @@ class RelayInfoService {
|
|||
triedNip11: oldRelayInfo.triedNip11 || relayInfo.triedNip11
|
||||
}
|
||||
: relayInfo
|
||||
|
||||
if (!Array.isArray(newRelayInfo.supported_nips)) {
|
||||
newRelayInfo.supported_nips = []
|
||||
}
|
||||
|
||||
this.relayInfoMap.set(newRelayInfo.url, newRelayInfo)
|
||||
await this.relayInfoIndex.addAsync(
|
||||
newRelayInfo.url,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue