Return the obj in setPrototypeOf fallback (#7080)

This commit is contained in:
Nicolò Ribaudo 2017-12-20 22:48:10 +01:00 committed by GitHub
parent 0c885b3200
commit ae3f5b9149
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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];

View File

@ -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); };

View File

@ -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); };