Skip to content
Myr

Fixed partial local inheritance precedence. Closes #454

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

  • other:+5 added−2 removed

1 file+5 added−2 removed

modified:lib/express/view.js+5 added-2 removed
117 unmodified lines
118 * @api public119 */120121http.ServerResponse.prototype.partial = function(view, options, ext, locals){122 locals = locals || {};123124 // Inherit parent view extension when not present125 if (ext && view.indexOf('.') < 0) {126 view += ext;127 }
9 unmodified lines
137 options = {};138 }139140 // Inherit locals from parent139 options.locals = options.locals || {};140 utils.merge(options.locals, locals);141 options.locals = options.locals142 ? utils.merge(locals, options.locals)143 : locals;144145 // Partials dont need layouts146 options.partial = true;147 options.layout = false;
185 unmodified lines