Return the obj in setPrototypeOf fallback (#7080)
This commit is contained in:
parent
0c885b3200
commit
ae3f5b9149
@ -428,7 +428,7 @@ helpers.inheritsLoose = defineHelper(`
|
||||
// Based on https://github.com/WebReflection/babel-plugin-transform-builtin-classes
|
||||
helpers.wrapNativeSuper = defineHelper(`
|
||||
var _gPO = Object.getPrototypeOf || function _gPO(o) { return o.__proto__ };
|
||||
var _sPO = Object.setPrototypeOf || function _sPO(o, p) { o.__proto__ = p };
|
||||
var _sPO = Object.setPrototypeOf || function _sPO(o, p) { o.__proto__ = p; return o };
|
||||
var _construct = (typeof Reflect === "object" && Reflect.construct) ||
|
||||
function _construct(Parent, args, Class) {
|
||||
var Constructor, a = [null];
|
||||
|
||||
@ -2,7 +2,7 @@ function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.crea
|
||||
|
||||
var _gPO = Object.getPrototypeOf || function _gPO(o) { return o.__proto__; };
|
||||
|
||||
var _sPO = Object.setPrototypeOf || function _sPO(o, p) { o.__proto__ = p; };
|
||||
var _sPO = Object.setPrototypeOf || function _sPO(o, p) { o.__proto__ = p; return o; };
|
||||
|
||||
var _construct = typeof Reflect === "object" && Reflect.construct || function _construct(Parent, args, Class) { var Constructor, a = [null]; a.push.apply(a, args); Constructor = Parent.bind.apply(Parent, a); return _sPO(new Constructor(), Class.prototype); };
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
|
||||
|
||||
var _gPO = Object.getPrototypeOf || function _gPO(o) { return o.__proto__; };
|
||||
|
||||
var _sPO = Object.setPrototypeOf || function _sPO(o, p) { o.__proto__ = p; };
|
||||
var _sPO = Object.setPrototypeOf || function _sPO(o, p) { o.__proto__ = p; return o; };
|
||||
|
||||
var _construct = typeof Reflect === "object" && Reflect.construct || function _construct(Parent, args, Class) { var Constructor, a = [null]; a.push.apply(a, args); Constructor = Parent.bind.apply(Parent, a); return _sPO(new Constructor(), Class.prototype); };
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user