diff --git a/src/lib/notesStorage.ts b/src/lib/notesStorage.ts index d09d29d..d9b69fd 100644 --- a/src/lib/notesStorage.ts +++ b/src/lib/notesStorage.ts @@ -21,10 +21,10 @@ export function saveNotes(notes: Note[]): void { function isNote(value: unknown): value is Note { if (typeof value !== 'object' || value === null) return false - const candidate = value as Record + const note = value as Record return ( - typeof candidate.id === 'number' && - typeof candidate.title === 'string' && - typeof candidate.content === 'string' + typeof note.id === 'number' && + typeof note.title === 'string' && + typeof note.content === 'string' ) }