Fix: Lint no-prototype-builtins (#5920)
* Fix: Lint no-prototype-builtins Closes: https://github.com/parse-community/parse-server/issues/5842 Reference: https://eslint.org/docs/rules/no-prototype-builtins * replace Object.hasOwnProperty.call
This commit is contained in:
committed by
Antonio Davi Macedo Coelho de Castro
parent
4bffdce047
commit
cf6e79ee75
@@ -356,12 +356,12 @@ function addParseCloud() {
|
||||
|
||||
function injectDefaults(options: ParseServerOptions) {
|
||||
Object.keys(defaults).forEach(key => {
|
||||
if (!options.hasOwnProperty(key)) {
|
||||
if (!Object.prototype.hasOwnProperty.call(options, key)) {
|
||||
options[key] = defaults[key];
|
||||
}
|
||||
});
|
||||
|
||||
if (!options.hasOwnProperty('serverURL')) {
|
||||
if (!Object.prototype.hasOwnProperty.call(options, 'serverURL')) {
|
||||
options.serverURL = `http://localhost:${options.port}${options.mountPath}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user