Fix TypeScript null check when preserving AI summary on crew save.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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 : ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user