Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

core: fix search queries with 3 characters not allowed

Abdullah Atta8fd0f97dfef6
diff --git a/packages/core/src/api/lookup.ts b/packages/core/src/api/lookup.ts
index be580b77e..1ba0c2629 100644
--- a/packages/core/src/api/lookup.ts
+++ b/packages/core/src/api/lookup.ts
@@ -41,7 +41,7 @@ export default class Lookup {
notes(query: string, notes?: FilteredSelector<Note>): SearchResults<Note> {
return this.toSearchResults(async (limit) => {
- if (query.length <= 3) return [];
+ if (query.length < 3) return [];
const db = this.db.sql() as unknown as Kysely<RawDatabaseSchema>;
query = query.replace(/"/, '""');