Replace builtin prototype method with Object.prototype
equivalent
This commit is contained in:
parent
ba325cdd63
commit
e2350b9aa4
@ -398,7 +398,7 @@ function removeDuplicates(a) {
|
|||||||
return a.filter(function(item) {
|
return a.filter(function(item) {
|
||||||
let type = typeof item;
|
let type = typeof item;
|
||||||
if(type in prims)
|
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
|
else
|
||||||
return objs.indexOf(item) >= 0 ? false : objs.push(item);
|
return objs.indexOf(item) >= 0 ? false : objs.push(item);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user