Error AtlasError Documentation and Resolution

JavaScript called super twice in a derived class constructor

ReferenceError: super() called twice in derived class constructor

JavaScript rejected a class constructor because super() was invoked more than once in a derived class.

ReferenceError: super() called twice in derived class constructorclasses
ReferenceError: super() called twice in derived class constructor
  • Constructor control flow can reach multiple super() calls.
  • Conditional logic or helper functions invoke super more than once.
  • A refactor duplicated initialization logic in a derived class.
  1. Ensure the derived constructor calls super exactly once.
  2. Restructure conditional branches so all paths share one super call.
  3. Review helper abstractions that may indirectly trigger super.
MDN: ReferenceError: super() called twice in derived class constructor
JavaScript super() called twice in derived class constructor | Error Atlas