diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 1de1cd419..9053ec132 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -1761,8 +1761,11 @@ function displayWorldEntries(name, data, navigation = navigation_option.none, fl return; } - // Regardless of whether success is displayed or not. Make sure the delete button is available. + // Regardless of whether success is displayed or not. Make sure the delete/rename button is available. // Do not put this code behind. + $('#world_popup_name_button').off('click').on('click', async () => { + await renameWorldInfo(name, data); + }); $('#world_popup_delete').off('click').on('click', async () => { const confirmation = await Popup.show.confirm(`Delete the World/Lorebook: "${name}"?`, 'This action is irreversible!'); if (!confirmation) { @@ -1910,10 +1913,6 @@ function displayWorldEntries(name, data, navigation = navigation_option.none, fl if (entry) updateEditor(entry.uid); }); - $('#world_popup_name_button').off('click').on('click', async () => { - await renameWorldInfo(name, data); - }); - $('#world_backfill_memos').off('click').on('click', async () => { let counter = 0; for (const entry of Object.values(data.entries)) { @@ -3584,7 +3583,7 @@ export async function getSortedEntries() { // Parse decorators entries = entries.map((entry) => { - const [decorators, content] = parseDecorators(entry.content); + const [decorators, content] = parseDecorators(entry.content || ''); return { ...entry, decorators, content }; });