mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Bail early from key iteration
This commit is contained in:
@ -53,6 +53,7 @@ async function charaWrite(img_url, data, target_img, response = undefined, mes =
|
|||||||
for (const key of characterDataCache.keys()) {
|
for (const key of characterDataCache.keys()) {
|
||||||
if (key.startsWith(img_url)) {
|
if (key.startsWith(img_url)) {
|
||||||
characterDataCache.delete(key);
|
characterDataCache.delete(key);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Read the image, resize, and save it as a PNG into the buffer
|
// Read the image, resize, and save it as a PNG into the buffer
|
||||||
|
Reference in New Issue
Block a user