Fixed the controller not waiting for initialization

ref #5
This commit is contained in:
2021-02-06 21:37:56 +01:00
parent 47a05facb3
commit ee8ba99cc7
2 changed files with 10 additions and 3 deletions

View File

@@ -20,11 +20,13 @@ export class PdfCreator {
* Initializes i18n(ext), Handlebars and puppeteer.
*/
constructor() {
this.init().then(() => {
return this;
})
this.init();
}
/**
* Main constructor.
* Initializes i18n(ext), Handlebars and puppeteer.
*/
public async init() {
await i18next
.use(Backend)