Bail early from key iteration

This commit is contained in:
Cohee 2023-12-15 22:13:02 +02:00
parent 9d1b563d48
commit 7dfa989e4c
1 changed files with 1 additions and 0 deletions

View File

@ -53,6 +53,7 @@ async function charaWrite(img_url, data, target_img, response = undefined, mes =
for (const key of characterDataCache.keys()) {
if (key.startsWith(img_url)) {
characterDataCache.delete(key);
break;
}
}
// Read the image, resize, and save it as a PNG into the buffer