Skip to content

[Bug] Using super in async method #9935

@orlov-vo

Description

@orlov-vo

Bug Report

Current Behavior
I have error RangeError: Maximum call stack size exceeded when I used a super in my async method

Input Code
REPL

class MyClass extends BaseClass {
  async loadEntity() {
    this.website = await this.loadWebsite();
    this.report.setCompany(this.website.company);
    super.loadEntity();
  }
}

Expected behavior/code
It should work without looping

class MyClass extends BaseClass {
  loadEntity() {
    var _this = this,
        _superprop_callLoadEntity = function _superprop_callLoadEntity() {
      return _superprop_callLoadEntity(...arguments); // <= HERE I HAVE LOOPING :(
    };

    return _asyncToGenerator(function* () {
      _this.website = yield _this.loadWebsite();

      _this.report.setCompany(_this.website.company);

      _superprop_callLoadEntity();
    })();
  }

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Has PRoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions