Replace builtin prototype method with Object.prototype equivalent

This commit is contained in:
deepsource-autofix[bot] 2022-09-05 16:39:08 +00:00 committed by GitHub
parent ba325cdd63
commit e2350b9aa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -398,7 +398,7 @@ function removeDuplicates(a) {
return a.filter(function(item) {
let type = typeof item;
if(type in prims)
return prims[type].hasOwnProperty(item) ? false : (prims[type][item] = true);
return Object.prototype.hasOwnProperty.call(prims.type, item) ? false : (prims[type][item] = true);
else
return objs.indexOf(item) >= 0 ? false : objs.push(item);
});