Skip to content
Myr

Fixed filename option passing to template engine

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 ca1bdb3 · 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
328 unmodified lines
329 options.partial = function(path, opts){330 return renderPartial(self, path, opts, options, view);331 };332333 // Provide filename to engine334 options.filename = view.path;335333 // cached view334 if (cache[view]) {335 view = cache[view];336 options.filename = view.path;337 // resolve view338 } else {339 var orig = view = new View(view, options);340
20 unmodified lines
361 err.view = orig;362 throw err;363 } 364365 options.filename = view.path;366 var engine = view.templateEngine;367 view.fn = engine.compile(view.contents, options)368 if (cacheViews) cache[orig.view] = view;369 }
45 unmodified lines