mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Filter out "undefined" stopping strings
This commit is contained in:
@ -1716,8 +1716,8 @@ export function getCustomStoppingStrings(limit = undefined) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Make sure all the elements are strings.
|
||||
strings = strings.filter((s) => typeof s === 'string');
|
||||
// Make sure all the elements are strings and non-empty.
|
||||
strings = strings.filter(s => typeof s === 'string' && s.length > 0);
|
||||
|
||||
// Substitute params if necessary
|
||||
if (power_user.custom_stopping_strings_macro) {
|
||||
|
Reference in New Issue
Block a user