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)
|
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 : ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user