Update cwb_lorebookManager.js

This commit is contained in:
2025-10-24 19:56:45 +08:00
committed by GitHub
parent 3c5e279920
commit 3b107382d2

View File

@@ -208,9 +208,11 @@ export async function updateCharacterRosterLorebookEntry(processedCharacterNames
} }
}); });
} }
const floorRangeKey = existingRosterEntry.keys.find(k => /^\d+-\d+$/.test(k)); if (Array.isArray(existingRosterEntry.keys)) {
if (floorRangeKey) { const floorRangeKey = existingRosterEntry.keys.find(k => /^\d+-\d+$/.test(k));
[oldStartFloor] = floorRangeKey.split('-').map(Number); if (floorRangeKey) {
[oldStartFloor] = floorRangeKey.split('-').map(Number);
}
} }
} }