Ajay Poshak b1923fd140
Add a check for privateMap's existence (#11571)
Co-authored-by: Ajay Poshak <ajay.poshak@bookmyshow.com>
2020-05-30 22:38:15 +02:00

66 lines
1.2 KiB
JavaScript

var _myAsyncMethod = new WeakMap();
class MyClass {
constructor() {
var _this = this;
_myAsyncMethod.set(this, {
writable: true,
value: function () {
var _ref = babelHelpers.asyncToGenerator(function* () {
console.log(_this);
});
return function value() {
return _ref.apply(this, arguments);
};
}()
});
}
}
var _myAsyncMethod2 = new WeakMap();
(class MyClass2 {
constructor() {
var _this2 = this;
_myAsyncMethod2.set(this, {
writable: true,
value: function () {
var _ref2 = babelHelpers.asyncToGenerator(function* () {
console.log(_this2);
});
return function value() {
return _ref2.apply(this, arguments);
};
}()
});
}
});
var _myAsyncMethod3 = new WeakMap();
export default class MyClass3 {
constructor() {
var _this3 = this;
_myAsyncMethod3.set(this, {
writable: true,
value: function () {
var _ref3 = babelHelpers.asyncToGenerator(function* () {
console.log(_this3);
});
return function value() {
return _ref3.apply(this, arguments);
};
}()
});
}
}