bigpipe/pagelet — pull request #7 by touv (2014-05-14 10:04:35+00:00)
Title: confusion in variable name ?

To avoid this error :

// {{{
if (err) return stream.write({ type: data.type, err: err });
^
TypeError: Cannot read property 'type' of undefined
// }}}

with this slice of code :

// {{{
require('bigpipe').Pagelet.extend({
name: 'test',
view: 'view.ejs',
streaming: true,
get: function(render) {
render(null, {});
},
post: function(body, files, next) {
next(new Error('error'));
}
}).on(module);
// }}}