Do not use object built-ins

This commit is contained in:
Daniel García Aubert 2019-11-14 12:18:13 +01:00
parent d4719d5707
commit dc669f5cd4

View File

@ -232,7 +232,7 @@ Aggregation.prototype._checkOptions = function (options) {
}
const requiredOptions = VALID_OPERATIONS[options.aggregation];
const missingOptions = requiredOptions.filter(requiredOption => !options.hasOwnProperty(requiredOption));
const missingOptions = requiredOptions.filter(requiredOption => !Object.prototype.hasOwnProperty.call(options, requiredOption));
if (missingOptions.length > 0) {
throw new Error(