mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Return cache to WI
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user