Fix TypeScript null check when preserving AI summary on crew save.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-03 12:51:40 +02:00
parent 6c48085904
commit f83d67b527
+8 -6
View File
@@ -470,12 +470,14 @@ export default function LogEntryEditor({
const local = await db.entries.get(entryId)
if (local) {
const decrypted = await tryDecryptEntryPayload(local, masterKey)
const existing =
decrypted && typeof decrypted.aiSummary === 'string' ? decrypted.aiSummary.trim() : ''
if (existing) {
summaryToSave = existing
summaryAtToSave =
typeof decrypted.aiSummaryGeneratedAt === 'string' ? decrypted.aiSummaryGeneratedAt : ''
if (decrypted) {
const existing =
typeof decrypted.aiSummary === 'string' ? decrypted.aiSummary.trim() : ''
if (existing) {
summaryToSave = existing
summaryAtToSave =
typeof decrypted.aiSummaryGeneratedAt === 'string' ? decrypted.aiSummaryGeneratedAt : ''
}
}
}
}