Avoid calling Object.prototype methods directly on object instances
This commit is contained in:
+1
-1
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user