Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ var trustProxyDefaultSymbol = '@@symbol:trust_proxy_default';
app.init = function init() {
var router = null;

this.cache = {};
this.engines = {};
this.settings = {};
this.cache = Object.create(null);
this.engines = Object.create(null);
this.settings = Object.create(null);

this.defaultConfiguration();

Expand Down
3 changes: 2 additions & 1 deletion test/app.locals.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ var express = require('../')

describe('app', function(){
describe('.locals', function () {
it('should default object', function () {
it('should default object with null prototype', function () {
var app = express()
assert.ok(app.locals)
assert.strictEqual(typeof app.locals, 'object')
assert.strictEqual(Object.getPrototypeOf(app.locals), null)
})

describe('.settings', function () {
Expand Down