Skip to content

Commit

Permalink
fix: rare crash in chaindata-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
alecdwm committed Apr 18, 2024
1 parent 35db12c commit 4d4fee8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/chaindata-provider/src/net.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export const availableTokenLogoFilenames = async (): Promise<string[]> =>
await fetch(
`${githubApi}/repos/${githubChaindataOrg}/${githubChaindataRepo}/contents/${githubChaindataTokensAssetsDir}`
).then((response) => response.json())
).flatMap((entry: unknown) => {
)?.flatMap?.((entry: unknown) => {
if (typeof entry !== "object" || entry === null) return []
if (!("name" in entry) || typeof entry.name !== "string") return []
return entry.name
})
}) ?? []

0 comments on commit 4d4fee8

Please sign in to comment.