Skip to content

Commit

Permalink
fix: check if item exists before accessing it (#3513) (#3516)
Browse files Browse the repository at this point in the history
Co-authored-by: Serhii Kulykov <[email protected]>
  • Loading branch information
vaadin-bot and web-padawan authored Mar 3, 2022
1 parent fba459b commit 6e67715
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/avatar-group/src/vaadin-avatar-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ class AvatarGroup extends ElementMixin(ThemableMixin(mixinBehaviors([IronResizab
const result = [];
for (let i = limit; i < items; i++) {
const item = this.items[i];
result.push(item.name || item.abbr || 'anonymous');
if (item) {
result.push(item.name || item.abbr || 'anonymous');
}
}
// override generated title attribute
this.$.overflow.setAttribute('title', result.join('\n'));
Expand Down

0 comments on commit 6e67715

Please sign in to comment.