Clear cached WI on deletion

Fixes #3672
This commit is contained in:
Cohee
2025-03-12 23:38:10 +02:00
parent 6af3f2ee7e
commit 12824bb680

View File

@@ -3542,6 +3542,10 @@ export async function deleteWorldInfo(worldInfoName) {
return false;
}
if (worldInfoCache.has(worldInfoName)) {
worldInfoCache.delete(worldInfoName);
}
const existingWorldIndex = selected_world_info.findIndex((e) => e === worldInfoName);
if (existingWorldIndex !== -1) {
selected_world_info.splice(existingWorldIndex, 1);