mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
switch to filter method
This commit is contained in:
@ -1895,12 +1895,7 @@ async function getMessagesCallback(args, value) {
|
|||||||
|
|
||||||
const messages = await Promise.all(messagePromises);
|
const messages = await Promise.all(messagePromises);
|
||||||
|
|
||||||
for (let i = 0; i < messages.length; /**/ ) {
|
return messages.filter(m => m !== null).join('\n\n');
|
||||||
if (messages[i] !== null) ++i;
|
|
||||||
else messages.splice(i, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return messages.join('\n\n');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function runCallback(args, name) {
|
async function runCallback(args, name) {
|
||||||
|
Reference in New Issue
Block a user