summaryrefslogtreecommitdiff
path: root/node_modules/@babel/runtime/helpers/esm/createSuper.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@babel/runtime/helpers/esm/createSuper.js')
-rw-r--r--node_modules/@babel/runtime/helpers/esm/createSuper.js25
1 files changed, 12 insertions, 13 deletions
diff --git a/node_modules/@babel/runtime/helpers/esm/createSuper.js b/node_modules/@babel/runtime/helpers/esm/createSuper.js
index 7c962976..dfabf711 100644
--- a/node_modules/@babel/runtime/helpers/esm/createSuper.js
+++ b/node_modules/@babel/runtime/helpers/esm/createSuper.js
@@ -1,17 +1,16 @@
import getPrototypeOf from "./getPrototypeOf.js";
import isNativeReflectConstruct from "./isNativeReflectConstruct.js";
import possibleConstructorReturn from "./possibleConstructorReturn.js";
-export default 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);
};
-} \ No newline at end of file
+}
+export { _createSuper as default }; \ No newline at end of file