Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Chris Anderson jchris authored

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. +5 1 shows/page.js
6 shows/page.js
... ... @@ -1,9 +1,13 @@
1 1 function(doc, req) {
  2 + // top two lines have to come first or else parent references in the ddoc
  3 + // which are created by calls to require will break JSON.stringify.
2 4 var name, stub, ddoc = this,
3 5 mustache = require("vendor/couchapp/lib/mustache"),
4 6 wiki = require("lib/wiki"),
5 7 data = {
6   - ddoc : JSON.stringify(require("vendor/couchapp/lib/code").ddoc(ddoc)),
  8 + ddoc : JSON.stringify(require("vendor/couchapp/lib/code").ddoc(ddoc), function(key, value) {
  9 + return (key == "parent") ? undefined : value;
  10 + }),
7 11 docid : JSON.stringify(req.id),
8 12 id : req.id,
9 13 path : "../page/"+req.id,

0 comments on commit be750fd

Please sign in to comment.
Something went wrong with that request. Please try again.