fix: `getNFTs` might return null and cause pages to crash (#735)

This commit is contained in:
runjuu 2023-07-05 08:27:21 -07:00 committed by GitHub
parent 31981faa59
commit b1566fc059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ export default async function SiteNFTPage({
const site = await fetchGetSite(params.site, queryClient)
const { t } = await useTranslation("common")
let nfts = await getNFTs(site?.owner)
let nfts = (await getNFTs(site?.owner)) ?? []
nfts.forEach((chain: any) => {
chain.assets = []