Skip to content
Myr

added sync signature for app.locals.use()

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 73f1da2 · Browse files · 1 file+8 added−1 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+8 added−1 removed

  • other:+8 added−1 removed

1 file+8 added−1 removed

modified:lib/application.js+8 added-1 removed
89 unmodified lines
90 return self;91 };9293 this.locals.use = function(fn){94 if (3 == fn.length) {94 self.viewCallbacks.push(fn);95 self.viewCallbacks.push(fn);96 } else {97 self.viewCallbacks.push(function(req, res, done){98 fn(req, res);99 done();100 });101 }102 return this;103 };104105 // expose objects to each other
487 unmodified lines