diff --git a/packages/server/src/db/inMemoryView.ts b/packages/server/src/db/inMemoryView.ts index b38c72b29b..4e9301f4ee 100644 --- a/packages/server/src/db/inMemoryView.ts +++ b/packages/server/src/db/inMemoryView.ts @@ -25,9 +25,8 @@ export async function runView( })) ) let fn = (doc: Document, emit: any) => emit(doc._id) - ;(0, eval)( - "fn = " + view?.map?.replace("function (doc)", "function (doc, emit)") - ) + // BUDI-7060 -> indirect eval call appears to cause issues in cloud + eval("fn = " + view?.map?.replace("function (doc)", "function (doc, emit)")) const queryFns: any = { meta: view.meta, map: fn,