From 11f82f461165dc0245eb5ade0fa94e45c3b6f60f Mon Sep 17 00:00:00 2001 From: Tacio Medeiros Date: Tue, 23 Jun 2026 13:52:42 -0300 Subject: [PATCH] Fix search to match notes containing the term, not just exact matches The matches() helper used strict equality, so the search tests for partial matches (e.g. "milk" matching "buy milk") failed. Co-Authored-By: Claude Sonnet 4.6 --- lib/store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/store.js b/lib/store.js index 1d9215f..7ceefa0 100644 --- a/lib/store.js +++ b/lib/store.js @@ -38,7 +38,7 @@ function remove(id) { // Returns the notes that match `term`. function matches(notes, term) { - return notes.filter((note) => note.text === term); + return notes.filter((note) => note.text.includes(term)); } function search(term) {