We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1443973 commit 26801a0Copy full SHA for 26801a0
lib/application.js
@@ -32,7 +32,6 @@ var setPrototypeOf = require('setprototypeof')
32
* @private
33
*/
34
35
-var hasOwnProperty = Object.prototype.hasOwnProperty
36
var slice = Array.prototype.slice;
37
38
/**
@@ -353,17 +352,7 @@ app.param = function param(name, fn) {
353
352
app.set = function set(setting, val) {
354
if (arguments.length === 1) {
355
// app.get(setting)
356
- var settings = this.settings
357
-
358
- while (settings && settings !== Object.prototype) {
359
- if (hasOwnProperty.call(settings, setting)) {
360
- return settings[setting]
361
- }
362
363
- settings = Object.getPrototypeOf(settings)
364
365
366
- return undefined
+ return this.settings[setting];
367
}
368
369
debug('set "%s" to %o', setting, val);
0 commit comments