Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anonymous functions transpiled with babel don't work with _design docs in couchdb #20

Closed
carlosduclos opened this issue Mar 17, 2017 · 1 comment

Comments

@carlosduclos
Copy link
Contributor

Original issue

export-mike
Hi I've been using nano and cradle and both libraries seem to have this problem,

possibly this change should be fixed in couchdb.

flatiron/cradle#306

Have you encountered this issue before? How else could it be fixed?

export-mike
update from @janl flatiron/cradle#306 (comment)

chirsfosterelli
For what it's worth, we've dealt with that by doing this:

const validate = function(newDoc, savedDoc, userCtx) {
   // Content here
}.toString()

This results in validate being a stringified function that can be passed to Nano, and babel will not name it.

@big-r81
Copy link
Contributor

big-r81 commented Jun 20, 2022

I'm closing this old ticket. If it's still a problem, please reopen or create a new ticket.

@big-r81 big-r81 closed this as completed Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants