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