Skip to content
Myr

Faster dynamicHelper "merge"

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

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:lib/express/view.js+2 added-2 removed
244 unmodified lines
245 var locals = options.locals = options.locals || {};246 options.locals.__filename = options.filename = path;247248 // Dynamic helper support249 if (options.dynamicHelpers !== false) {249 if (false !== options.dynamicHelpers) {250 // cache251 if (!this.__dynamicHelpers) {252 this.__dynamicHelpers = {};253 var keys = Object.keys(dynamicHelpers);
9 unmodified lines
263 }264 }265266 // apply267 utils.merge(helpers, this.__dynamicHelpers);267 helpers.__proto__ = this.__dynamicHelpers;268 }269270 // Merge view helpers271 options.locals.__proto__ = helpers;
45 unmodified lines