Permalink
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...
1 parent 752b3ec commit be750fd67dc21eb278727fc26371454f034a9b3c @jchris jchris committed Oct 6, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 shows/page.js
View
@@ -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,

0 comments on commit be750fd

Please sign in to comment.