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