Avoid calling Object.prototype methods directly on object instances

This commit is contained in:
Daniel García Aubert
2019-10-21 23:33:27 +02:00
parent d89e785440
commit 7a1d2ca205
42 changed files with 166 additions and 166 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ const ServerInfoController = require('./server-info-controller');
const StatsClient = require('./stats/client');
module.exports = function createServer (serverOptions) {
if (!serverOptions.hasOwnProperty('routes')) {
if (!Object.prototype.hasOwnProperty.call(serverOptions, 'routes')) {
throw new Error('Must initialise server with "routes" as base paths configuration');
}