Fix callback return types

This commit is contained in:
Cohee
2025-04-19 01:05:14 +03:00
parent e3f5949cc1
commit 75d0cf828a

View File

@@ -1340,14 +1340,14 @@ function registerWorldInfoSlashCommands() {
async function getGlobalBooksCallback() { async function getGlobalBooksCallback() {
if (!selected_world_info?.length) { if (!selected_world_info?.length) {
return []; return JSON.stringify([]);
} }
let entries = selected_world_info.slice(); let entries = selected_world_info.slice();
console.debug(`[WI] Selected global world info has ${entries.length} entries`, selected_world_info); console.debug(`[WI] Selected global world info has ${entries.length} entries`, selected_world_info);
return entries; return JSON.stringify(entries);
} }
SlashCommandParser.addCommandObject(SlashCommand.fromProps({ SlashCommandParser.addCommandObject(SlashCommand.fromProps({