-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: handle empty metadata #2660
Conversation
Branch preview⏳ Deploying a preview site... |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
Coverage report
Show files with reduced coverage 🔻
Test suite run success1043 tests passing in 141 suites. Report generated by 🧪jest coverage report action from 9505a58 |
src={proposer.metadata.icons[0]} | ||
width={32} | ||
height={32} | ||
alt={`${proposer.metadata.name} logo`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this instance it cannot be empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in cc9fb09.
What it solves
Resolves crashes when
metadata
is emptyHow this PR fixes it
The icon is no longer rendered in the
ProposalForm
if none is provided in themetadata.icons
array, andthis dApp
is used as a fallback for themetadata.name
.How to test it
Connect to Satellite and observe no error, as well as successful transacting.
Checklist