Skip to content
Myr

Fixed res.partial(); next(err) when no callback is given [reported by aheckmann]

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 7888cb0 · Browse files · 3 files+15 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+15 added−1 removed

  • tests:+13 added−0 removed
  • other:+2 added−1 removed

3 files+15 added−1 removed

modified:lib/view.js+2 added-1 removed
177 unmodified lines
178 } catch (err) {179 if (fn) {180 fn(err);181 } else {182 throw err;182 this.req.next(err);183 }184 return;185 }186187 // callback or transfer188 if (fn) {
196 unmodified lines
added:test/fixtures/error.jade+1 added
1= user.name
modified:test/view.test.js+12 added
617 unmodified lines
618619 assert.response(app,620 { url: '/root/underscore' },621 { body: '<p>Testing</p>' });622623 // error in template624625 app.get('/error', function(req, res){626 process.nextTick(function(){627 res.partial('error');628 });629 });630631 assert.response(app,632 { url: '/error' },633 { status: 500 });634 },635 636 'test #partial() with several calls': function(){637 var app = create();
419 unmodified lines