Filter out "undefined" stopping strings

This commit is contained in:
Cohee
2023-09-21 22:02:51 +03:00
parent d8380a390a
commit 6ae1b7a72b
2 changed files with 3 additions and 3 deletions

View File

@@ -1848,7 +1848,7 @@ function getStoppingStrings(isImpersonate) {
if (group && Array.isArray(group.members)) {
const names = group.members
.map(x => characters.find(y => y.avatar == x))
.filter(x => x && x.name !== name2)
.filter(x => x && x.name && x.name !== name2)
.map(x => `\n${x.name}:`);
result.push(...names);
}