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