Return cache to WI

This commit is contained in:
Cohee
2024-06-23 16:24:33 +03:00
parent 38cc4f789b
commit e736283785

View File

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