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) const local = await db.entries.get(entryId)
if (local) { if (local) {
const decrypted = await tryDecryptEntryPayload(local, masterKey) const decrypted = await tryDecryptEntryPayload(local, masterKey)
const existing = if (decrypted) {
decrypted && typeof decrypted.aiSummary === 'string' ? decrypted.aiSummary.trim() : '' const existing =
if (existing) { typeof decrypted.aiSummary === 'string' ? decrypted.aiSummary.trim() : ''
summaryToSave = existing if (existing) {
summaryAtToSave = summaryToSave = existing
typeof decrypted.aiSummaryGeneratedAt === 'string' ? decrypted.aiSummaryGeneratedAt : '' summaryAtToSave =
typeof decrypted.aiSummaryGeneratedAt === 'string' ? decrypted.aiSummaryGeneratedAt : ''
}
} }
} }
} }