From 84eeba6e28bf7214722838bd75b2773cd07c7c4d Mon Sep 17 00:00:00 2001 From: vinla Date: Tue, 23 Jun 2026 13:44:49 +0100 Subject: [PATCH] Fix search to match notes containing the term search() used exact string equality, so it only returned notes whose text matched the term verbatim. Use String.includes() so a note is returned whenever the term appears anywhere in its text. Co-Authored-By: Claude Opus 4.8 (1M context) --- 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) {