Skip to content
Myr

misc refactor of res.partial()

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 1b199b7 · Browse files · 1 file+2 added−3 removed
This commit

State

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

Diff stats

1 file+2 added−3 removed

  • other:+2 added−3 removed

1 file+2 added−3 removed

modified:lib/view.js+2 added-3 removed
254 unmodified lines
255256res.partial = function(view, options, fn){257 var app = this.app258 , options = options || {}259 , viewEngine = app.set('view engine')260 , parent = {};261262 // accept callback as second argument263 if ('function' == typeof options) {
4 unmodified lines
268 // root "views" option269 parent.dirname = app.set('views') || process.cwd() + '/views';270271 // utilize "view engine" option271 if (app.set('view engine')) {272 parent.extension = '.' + app.set('view engine');273 }272 if (viewEngine) parent.extension = '.' + viewEngine;273274 // render the partial275 try {276 var str = renderPartial(this, view, options, null, parent);
185 unmodified lines