-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Req is missing inside a _list function
Expected Behavior
I'm using "req" inside a function stored in _list.
It worked perfectly until recently (and I cannot reproduce locally with an older version of CouchDB).
Current Behavior
error: "render_error"
reason:"function raised error: (new TypeError("req.query is undefined", "lists.schools", 5))
Here is school.js inside _list:
function(head, req) {
req = req || {}; // odd bug
req.query = req.query || {}; // odd bug
var callback = req.query.callback || null;
I've added the two first lines hoping it will fix the bug, but it has not. :(
req.query comes from a rewrite.
{ "from": "portal/api/guest/schools/:schoolid", "to": "_list/schools/allschools",
"query": { "callback": "os_guest_domaintest", "access": "all" } },
Possible Solution
No idea.
Your Environment
- Version used: 2.1.2 and 2.2 (but not 2.1.1)
- Browser Name and version: Chrome
- Operating System and version (desktop or mobile): MacOS X
Metadata
Metadata
Assignees
Labels
No labels