summaryrefslogtreecommitdiff
path: root/node_modules/@babel/runtime/helpers/createSuper.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@babel/runtime/helpers/createSuper.js')
-rw-r--r--node_modules/@babel/runtime/helpers/createSuper.js22
1 files changed, 10 insertions, 12 deletions
diff --git a/node_modules/@babel/runtime/helpers/createSuper.js b/node_modules/@babel/runtime/helpers/createSuper.js
index bd72679c..b1869e61 100644
--- a/node_modules/@babel/runtime/helpers/createSuper.js
+++ b/node_modules/@babel/runtime/helpers/createSuper.js
@@ -1,18 +1,16 @@
var getPrototypeOf = require("./getPrototypeOf.js");
var isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
var possibleConstructorReturn = require("./possibleConstructorReturn.js");
-function _createSuper(Derived) {
- var hasNativeReflectConstruct = isNativeReflectConstruct();
- return function _createSuperInternal() {
- var Super = getPrototypeOf(Derived),
- result;
- if (hasNativeReflectConstruct) {
- var NewTarget = getPrototypeOf(this).constructor;
- result = Reflect.construct(Super, arguments, NewTarget);
- } else {
- result = Super.apply(this, arguments);
- }
- return possibleConstructorReturn(this, result);
+function _createSuper(t) {
+ var r = isNativeReflectConstruct();
+ return function () {
+ var e,
+ o = getPrototypeOf(t);
+ if (r) {
+ var s = getPrototypeOf(this).constructor;
+ e = Reflect.construct(o, arguments, s);
+ } else e = o.apply(this, arguments);
+ return possibleConstructorReturn(this, e);
};
}
module.exports = _createSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; \ No newline at end of file