From 710d0a80944946f0f4ccbc74650541968208c76b Mon Sep 17 00:00:00 2001 From: Sugat Bajracharya Date: Fri, 9 Aug 2024 21:41:51 +0545 Subject: [PATCH] fix(#9193): make changes to queryDocs function is local/doc.ts according to new PouchDB API --- shared-libs/cht-datasource/src/local/libs/doc.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/shared-libs/cht-datasource/src/local/libs/doc.ts b/shared-libs/cht-datasource/src/local/libs/doc.ts index a4c5181f468..69962a0698b 100644 --- a/shared-libs/cht-datasource/src/local/libs/doc.ts +++ b/shared-libs/cht-datasource/src/local/libs/doc.ts @@ -27,8 +27,12 @@ export const getDocsByIds = (db: PouchDB.Database) => async (uuids: string[ .filter((doc): doc is Doc => isDoc(doc)); }; -const queryDocs = (db: PouchDB.Database, view: string, options: PouchDB.Query.Options) => db - .query(view, {...options}) +const queryDocs = ( + db: PouchDB.Database, + view: string, + options: PouchDB.Query.Options> +) => db + .query(view, options) .then(({ rows }) => rows.map(({ doc }) => isDoc(doc) ? doc : null)); /** @internal */