diff --git a/src/lib/notesStorage.ts b/src/lib/notesStorage.ts index d9b69fd..c14d6a8 100644 --- a/src/lib/notesStorage.ts +++ b/src/lib/notesStorage.ts @@ -3,11 +3,11 @@ import type { Note } from '../types/note' const STORAGE_KEY = 'notes' export function loadNotes(): Note[] { - const raw = localStorage.getItem(STORAGE_KEY) - if (raw === null) return [] + const storage = localStorage.getItem(STORAGE_KEY) + if (storage === null) return [] try { - const parsed: unknown = JSON.parse(raw) + const parsed: unknown = JSON.parse(storage) if (!Array.isArray(parsed)) return [] return parsed.filter(isNote) } catch {