caolan/kanso — Issue #322: value is a non-null object
Author: osher
Created: 2011-12-01 22:25:28+00:00
State: open

Ubuntu server, node 0.6.2, npm 1.0.11, chrome.

I'm doing the get-started tutorial.

After adding the following code:

```

var form = new forms.Form(types.blogpost, null, {
exclude: ['created', 'comments']
});

```
(and pushig the app)

I get from couchdb the following error:

```

{"error":"render_error","reason":"function raised error: (new TypeError(\"value is not a non-null object\", \"\", 30)) \nstacktrace: ((void 0),[object Object])@:30\n([object Object])@:350\n(null,[object Object])@:26\n((function (doc, req) {var form = new forms.Form(types.blogpost, null, {exclude: [\"created\", \"comments\"]}), content = templates.render(\"blogpost_form.html\", req, {form_title: \"Add new blogpost\", form: form.toHTML(req)});return {title: \"Add new blogpost\", content: content};}),null,[object Object])@:630\n(null,[object Object])@:0\nrunShow(function (doc, req) {var core = require(\"kanso/core\");var fn = require(\"lib/app\").shows.add_blogpost;return core.runShow(fn, doc, req);},[object Object],[object Array])@/usr/dev/build-couchdb/build/share/couchdb/server/main.js:887\n(function (doc, req) {var core = require(\"kanso/core\");var fn = require(\"lib/app\").shows.add_blogpost;return core.runShow(fn, doc, req);},[object Object],[object Array])@/usr/dev/build-couchdb/build/share/couchdb/server/main.js:994\n(\"_design/myblog\",[object Array],[object Array])@/usr/dev/build-couchdb/build/share/couchdb/server/main.js:1435\n()@/usr/dev/build-couchdb/build/share/couchdb/server/main.js:1478\n@/usr/dev/build-couchdb/build/share/couchdb/server/main.js:1489\n"}

```

replacing the ```null``` in second arguments with ```{}``` clears the crash, however, I only get the "add" button, and no other form fields (expected fields: title, text)