Skip to content

Commit

Permalink
fix: check if item exists before accessing it (#3513)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan committed Mar 3, 2022
1 parent f5da160 commit 001492c
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 @@ -395,7 +395,9 @@ class AvatarGroup extends ResizeMixin(ElementMixin(ThemableMixin(PolymerElement)
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 001492c

Please sign in to comment.