mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-05 13:36:47 +01:00
Fix broken avatar thumbnail upon deleting last member of a group
This commit is contained in:
parent
603acfc257
commit
63cd8b98dd
@ -598,6 +598,11 @@ function getGroupAvatar(group) {
|
||||
return groupAvatar;
|
||||
}
|
||||
|
||||
// catch edge case where group had one member and that member is deleted
|
||||
if (avatarCount === 0) {
|
||||
return $('<div class="missing-avatar fa-solid fa-user-slash"></div>');
|
||||
}
|
||||
|
||||
// default avatar
|
||||
const groupAvatar = $('#group_avatars_template .collage_1').clone();
|
||||
groupAvatar.find('.img_1').attr('src', group.avatar_url || system_avatar);
|
||||
|
Loading…
Reference in New Issue
Block a user