UX: Only add `user-badge-buttons` wrapper when badges exist (#30060)

Followup to 2513339955
This commit is contained in:
David Taylor 2024-12-03 13:12:44 +00:00 committed by GitHub
parent 9389bf295c
commit c3e87b5036
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ export default createWidget("poster-name", {
} }
} }
if (attrs.badgesGranted) { if (attrs.badgesGranted?.length) {
const badges = []; const badges = [];
attrs.badgesGranted.forEach((badge) => { attrs.badgesGranted.forEach((badge) => {
// Alter the badge description to show that the badge was granted for this post. // Alter the badge description to show that the badge was granted for this post.