Skip to content

Commit

Permalink
fix: load profile view even if indexer api is down (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaskarSingh authored Mar 15, 2021
1 parent c54f771 commit f76ac43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/tezos/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function Profile() {
<div>Error: {ownedBots.error.message}</div>
) : (
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
{ownedBots.value.length > 0 ? (
{ownedBots.value && ownedBots.value.length > 0 ? (
ownedBots.value.map(el => {
return (
<div key={el.tokenId}>
Expand Down Expand Up @@ -214,7 +214,7 @@ function Profile() {
<div>Error: {ownedBots.error.message}</div>
) : (
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
{ownedBots.value.filter(el => el.isForSale === true)
{ownedBots.value && ownedBots.value.filter(el => el.isForSale === true)
.length > 0 ? (
ownedBots.value
.filter(el => el.isForSale === true)
Expand Down

0 comments on commit f76ac43

Please sign in to comment.