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 { @@ -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…
Cancel
Save