diff --git a/notes-app/notes.js b/notes-app/notes.js index 107a872..bb07668 100644 --- a/notes-app/notes.js +++ b/notes-app/notes.js @@ -5,6 +5,8 @@ const addNote = (title, body) => { const notes = loadNotes(); const duplicateNote = notes.find((note) => note.title === title); + debugger; + if (!duplicateNote) { notes.push({ title: title, diff --git a/notes-app/notes.json b/notes-app/notes.json index 1fe2af7..948de74 100644 --- a/notes-app/notes.json +++ b/notes-app/notes.json @@ -1 +1 @@ -[{"title":"List","body":"Sweater, Pants"},{"title":"Course Ideas","body":""}] \ No newline at end of file +[{"title":"List","body":"Sweater, Pants"},{"title":"Course Ideas","body":""},{"title":"Courses","body":"Node.js"}] \ No newline at end of file