Skip to content
Myr

Refactored app.set()

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

  • other:+5 added−5 removed

1 file+5 added−5 removed

modified:lib/express/server.js+5 added-5 removed
229 unmodified lines
230 */231232Server.prototype.set = function(setting, val){233 if (val === undefined) {234 var app = this;235 do {236 if (app.settings.hasOwnProperty(setting))237 return app.settings[setting];238 } while (app = app.parent);234 if (this.settings.hasOwnProperty(setting)) {235 return this.settings[setting];236 } else if (this.parent) {237 return this.parent.set(setting);238 }239 } else {240 this.settings[setting] = val;241 return this;242 }
71 unmodified lines