Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
praju-aot committed Nov 21, 2024
1 parent b695089 commit f381ac2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dops/src/modules/dgen/dgen.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export class DgenService {
let browser: Browser;
let page: Page;
try {
browser = await puppeteer.launch({
browser = await puppeteer.launch({
args: [
'--no-sandbox',
'--disable-gpu',
Expand All @@ -239,15 +239,15 @@ export class DgenService {
'--disable-breakpad',
'--disable-client-side-phishing-detection',
'--disable-extensions',
'--disable-plugins'
'--disable-plugins',
],
pipe: true,
headless: true,
env: {
ELECTRON_DISABLE_SANDBOX: '1',
},
});
page = await browser.newPage();
page = await browser.newPage();
await page.setContent(htmlBody);
await page.emulateMediaType('print');

Expand All @@ -268,7 +268,7 @@ export class DgenService {
this.logger.error(error);
throw error;
} finally {
if(page){
if (page) {
await page.close();
}
if (browser) {
Expand Down

0 comments on commit f381ac2

Please sign in to comment.