Skip to content

Commit

Permalink
Display total assets = 0 when the campaign image does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
TyroneAEM committed May 29, 2024
1 parent 30dfb9e commit e9cb951
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions blocks/gmo-campaign-details/gmo-campaign-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ export default async function decorate(block) {
insertImageIntoCampaignImg(block,imageObject);
document.getElementById('totalassets').textContent = imageObject.assetCount;
}
else
{
document.getElementById('totalassets').textContent = 0;
}
} catch (error) {
console.error("Failed to load campaign image:", error);
}
Expand Down

0 comments on commit e9cb951

Please sign in to comment.