Skip to content

Commit

Permalink
Merge branch '5.x' into ignore-settings-on-object-prototype-5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn committed Apr 29, 2024
2 parents 790d083 + 1443973 commit 68cb997
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ var trustProxyDefaultSymbol = '@@symbol:trust_proxy_default';
app.init = function init() {
var router = null;

this.cache = {};
this.engines = {};
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

0 comments on commit 68cb997

Please sign in to comment.