fix(core): update

This commit is contained in:
2022-06-29 00:24:43 +02:00
parent f4141bf201
commit 839eafd73f
4 changed files with 33 additions and 17 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@pushrocks/smartpdf',
version: '3.0.6',
version: '3.0.7',
description: 'create pdfs on the fly'
}

View File

@ -26,6 +26,7 @@ export class SmartPdf {
}
async start(headlessBrowserArg?: plugins.smartpuppeteer.puppeteer.Browser) {
const done = plugins.smartpromise.defer();
// lets set the external browser in case one is provided
this.headlessBrowser = headlessBrowserArg;
// setup puppeteer
@ -49,7 +50,9 @@ export class SmartPdf {
this.htmlServerInstance.listen(3210, 'localhost');
this.htmlServerInstance.on('listening', () => {
this._readyDeferred.resolve();
done.resolve();
});
await done.promise;
}
// stop