diff --git a/core/indexing/docs/db.ts b/core/indexing/docs/db.ts index bde6ce980..151b220fb 100644 --- a/core/indexing/docs/db.ts +++ b/core/indexing/docs/db.ts @@ -142,11 +142,7 @@ export async function listDocs(): Promise< } export async function hasDoc(baseUrl: string) { - const db = await open({ - filename: getDocsSqlitePath(), - driver: sqlite3.Database, - }); - await createDocsTable(db); + const db = await getDBDocs(); const doc = await db.get(`SELECT title FROM docs WHERE baseUrl =?`, baseUrl); return!!doc; }