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