fix: check the type of supported_nips

This commit is contained in:
codytseng
2025-04-27 09:45:33 +08:00
parent f5f34e31fa
commit a91eaf668b

View File

@@ -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,