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