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

30 lines
523 B
JavaScript

class Base {
superMethod() {
return 'good';
}
}
var _privateMethod = new WeakSet();
class Sub extends Base {
constructor(...args) {
super(...args);
_privateMethod.add(this);
}
superMethod() {
return 'bad';
}
publicMethod() {
return babelHelpers.classPrivateMethodGet(this, _privateMethod, _privateMethod2).call(this);
}
}
var _privateMethod2 = function _privateMethod2() {
return babelHelpers.get(babelHelpers.getPrototypeOf(Sub.prototype), "superMethod", this).call(this);
};