Reverted eval call to direct. Indirect appears to cause issues in cloud

This commit is contained in:
Dean 2023-05-26 10:22:28 +01:00
parent 82ac46e5eb
commit e1a87f2072
1 changed files with 2 additions and 3 deletions

View File

@ -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,