Browse Source

fix: check the type of supported_nips

imwald
codytseng 11 months ago
parent
commit
a91eaf668b
  1. 5
      src/services/relay-info.service.ts

5
src/services/relay-info.service.ts

@ -185,6 +185,11 @@ class RelayInfoService {
triedNip11: oldRelayInfo.triedNip11 || relayInfo.triedNip11 triedNip11: oldRelayInfo.triedNip11 || relayInfo.triedNip11
} }
: relayInfo : relayInfo
if (!Array.isArray(newRelayInfo.supported_nips)) {
newRelayInfo.supported_nips = []
}
this.relayInfoMap.set(newRelayInfo.url, newRelayInfo) this.relayInfoMap.set(newRelayInfo.url, newRelayInfo)
await this.relayInfoIndex.addAsync( await this.relayInfoIndex.addAsync(
newRelayInfo.url, newRelayInfo.url,

Loading…
Cancel
Save