summaryrefslogtreecommitdiff
path: root/node_modules/core-js/modules/_inherit-if-required.js
blob: d3948405bb040a00278284a28d2a5c8ff74a1d5e (plain)
1
2
3
4
5
6
7
8
var isObject       = require('./_is-object')
  , setPrototypeOf = require('./_set-proto').set;
module.exports = function(that, target, C){
  var P, S = target.constructor;
  if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){
    setPrototypeOf(that, P);
  } return that;
};