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