Skip to content
Myr

misc view refactoring

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 5bc86b9 · Browse files · 1 file+1 added−6 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+1 added−6 removed

  • other:+1 added−6 removed

1 file+1 added−6 removed

modified:lib/view.js+1 added-6 removed
125 unmodified lines
126127function renderPartial(res, view, options, parentLocals, parent){128 var collection, object, locals;129130 // Inherit parent view extension when not present131 if (parent && !~view.indexOf('.')) {132 view += parent.extension;133 }134130 if (options) {131 // collection132 if (options.collection) {133 collection = options.collection;
129 unmodified lines
263 // root "views" option264 parent.dirname = app.set('views') || process.cwd() + '/views';265266 // utilize "view engine" option272 if (viewEngine) parent.extension = '.' + viewEngine;267 if (viewEngine) parent.engine = viewEngine;268269 // render the partial270 try {271 var str = renderPartial(this, view, options, null, parent);
186 unmodified lines