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
co-authored by Cursor
parent 6c48085904
commit f83d67b527
+3 -1
View File
@@ -470,8 +470,9 @@ 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)
if (decrypted) {
const existing = const existing =
decrypted && typeof decrypted.aiSummary === 'string' ? decrypted.aiSummary.trim() : '' typeof decrypted.aiSummary === 'string' ? decrypted.aiSummary.trim() : ''
if (existing) { if (existing) {
summaryToSave = existing summaryToSave = existing
summaryAtToSave = summaryAtToSave =
@@ -479,6 +480,7 @@ export default function LogEntryEditor({
} }
} }
} }
}
const entryData: Record<string, unknown> = { const entryData: Record<string, unknown> = {
...buildPayloadForSigning(eventsOverride), ...buildPayloadForSigning(eventsOverride),