mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
fix: return empty array if query is empty
This commit is contained in:
@@ -83,6 +83,7 @@ class Database {
|
|||||||
* @param {string} query the search query
|
* @param {string} query the search query
|
||||||
*/
|
*/
|
||||||
async searchNotes(query) {
|
async searchNotes(query) {
|
||||||
|
if (!query) return [];
|
||||||
//TODO benchmark this and make it faster if necessary
|
//TODO benchmark this and make it faster if necessary
|
||||||
let notes = await this.getNotes();
|
let notes = await this.getNotes();
|
||||||
if (!notes) return;
|
if (!notes) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user