Uncaught ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor
Did anyone have an idea about this error and where I can learn more about it?
You need to call the super constructor, like the error says. Here's an example to illustrate:
class Person{
constructor(name){
this.name = name;
}
}
class Batman extends Person{
constructor(){
super(); // <--- You need to do this.
this.name = 'Batman';
}
}
var batman = new Batman();