From 0fbbfaac7c45ec34f0424ff5c929aeb9ead69513 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Mon, 3 Jun 2019 13:56:43 +0200 Subject: [PATCH] fix(core): update --- ts/smartpdf.classes.smartpdf.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ts/smartpdf.classes.smartpdf.ts b/ts/smartpdf.classes.smartpdf.ts index 8e8b9ab..b4501fb 100644 --- a/ts/smartpdf.classes.smartpdf.ts +++ b/ts/smartpdf.classes.smartpdf.ts @@ -15,12 +15,13 @@ export class SmartPdf { private _readyDeferred: plugins.smartpromise.Deferred; private _candidates: { [key: string]: PdfCandidate } = {}; - constructor(headlessBrowserArg?) { - this.headlessBrowser = headlessBrowserArg + constructor() { this._readyDeferred = new plugins.smartpromise.Deferred(); } - async start() { + async start(headlessBrowserArg?) { + // lets set the external browser in case one is provided + this.headlessBrowser = headlessBrowserArg // setup puppeteer if (!this.headlessBrowser) { let chromeArgs: string[] = [];