diff --git a/src/app/components/RelayItem.svelte b/src/app/components/RelayItem.svelte index 307f71e..a310f7c 100644 --- a/src/app/components/RelayItem.svelte +++ b/src/app/components/RelayItem.svelte @@ -29,7 +29,7 @@ >{displayUrl($relay.profile.contact)} • {/if} - {#if $relay?.profile?.supported_nips} + {#if Array.isArray($relay?.profile?.supported_nips)} diff --git a/src/app/state.ts b/src/app/state.ts index 2016737..738fb88 100644 --- a/src/app/state.ts +++ b/src/app/state.ts @@ -485,7 +485,7 @@ export const messages = derived( export const groupMeta = deriveEvents(repository, {filters: [{kinds: [GROUP_META]}]}) export const hasNip29 = (relay?: Relay) => - relay?.profile?.supported_nips?.map(String)?.includes("29") + relay?.profile?.supported_nips?.map?.(String)?.includes?.("29") // Channels diff --git a/src/routes/spaces/[relay]/+page.svelte b/src/routes/spaces/[relay]/+page.svelte index f8f7e7c..16ca0b8 100644 --- a/src/routes/spaces/[relay]/+page.svelte +++ b/src/routes/spaces/[relay]/+page.svelte @@ -112,7 +112,7 @@ Requires PoW {limitation?.min_pow_difficulty}
{/if} - {#if supported_nips} + {#if Array.isArray(supported_nips)}NIPs: {supported_nips.join(", ")}