Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "can use regular json stringify for ddocs now" -- requires Cou…

…chDB trunk, reverting for now

This reverts commit 1d975b2.
  • Loading branch information...
commit be750fd67dc21eb278727fc26371454f034a9b3c 1 parent 752b3ec
@jchris jchris authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 shows/page.js
View
6 shows/page.js
@@ -1,9 +1,13 @@
function(doc, req) {
+ // top two lines have to come first or else parent references in the ddoc
+ // which are created by calls to require will break JSON.stringify.
var name, stub, ddoc = this,
mustache = require("vendor/couchapp/lib/mustache"),
wiki = require("lib/wiki"),
data = {
- ddoc : JSON.stringify(require("vendor/couchapp/lib/code").ddoc(ddoc)),
+ ddoc : JSON.stringify(require("vendor/couchapp/lib/code").ddoc(ddoc), function(key, value) {
+ return (key == "parent") ? undefined : value;
+ }),
docid : JSON.stringify(req.id),
id : req.id,
path : "../page/"+req.id,
Please sign in to comment.
Something went wrong with that request. Please try again.