I have an ES6 class file that looks like so:
import { BaseClass } from './xm/classes/class-file.js';
export class myClass extends BaseClass {
constructor() {
super();
}
createFormSession(formId, payload) {
return new NewForm(formId, payload);
}
}
class NewForm {
constructor(formId, payload) {
this.formId = formId;
this.payload = payload;
}
}
I am getting this error on that says expecting myClass is not a constructor.
So it seems like it's expecting BaseClass but it can't find it and I am unclear as to why, when it was working in my local development server.
The actual line of code that causes the error is where the first constructor()
function is referenced and the error is appearing in console of Chrome browser.
The way it's being called:
var defaultUIHandler = new window.myClass()
I have also tried:
var defaultUIHandler = new window.myClass()