Return cache to WI

This commit is contained in:
Cohee 2024-06-23 16:24:33 +03:00
parent 38cc4f789b
commit e736283785
1 changed files with 5 additions and 5 deletions

View File

@ -946,9 +946,9 @@ async function loadWorldInfoData(name) {
return;
}
// if (worldInfoCache[name]) {
// return worldInfoCache[name];
// }
if (worldInfoCache[name]) {
return worldInfoCache[name];
}
const response = await fetch('/api/worldinfo/get', {
method: 'POST',
@ -2563,7 +2563,7 @@ const newEntryDefinition = {
};
const newEntryTemplate = Object.fromEntries(
Object.entries(newEntryDefinition).map(([key, value]) => [key, value.default])
Object.entries(newEntryDefinition).map(([key, value]) => [key, value.default]),
);
function createWorldInfoEntry(_name, data) {
@ -2594,7 +2594,7 @@ async function saveWorldInfo(name, data, immediately) {
return;
}
// delete worldInfoCache[name];
delete worldInfoCache[name];
if (immediately) {
return await _save(name, data);