massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / es / instance / splice.js
index 5b907f4b3f49ce199cb9e0ca9f34df50ce0f6fcd..d44435f0872bb2a0d08081e488de77b38bdf6f78 100644 (file)
@@ -1,8 +1,9 @@
-var splice = require('../array/virtual/splice');
+var isPrototypeOf = require('../../internals/object-is-prototype-of');
+var method = require('../array/virtual/splice');
 
 var ArrayPrototype = Array.prototype;
 
 module.exports = function (it) {
   var own = it.splice;
-  return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.splice) ? splice : own;
+  return it === ArrayPrototype || (isPrototypeOf(ArrayPrototype, it) && own === ArrayPrototype.splice) ? method : own;
 };