From 0b03ea9de295adbb74cea6ce5a6453fb0a1beb5f Mon Sep 17 00:00:00 2001 From: Sparticuz Date: Fri, 10 Feb 2023 14:31:43 -0500 Subject: [PATCH] lint --- examples/production-dependency/index.js | 5 ++--- examples/serverless-with-lambda-layer/index.js | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/examples/production-dependency/index.js b/examples/production-dependency/index.js index 3916263..8f2ea05 100644 --- a/examples/production-dependency/index.js +++ b/examples/production-dependency/index.js @@ -1,5 +1,5 @@ const puppeteer = require("puppeteer-core"); -const chromium = require('@sparticuz/chromium'); +const chromium = require("@sparticuz/chromium"); const handler = async () => { try { @@ -21,10 +21,9 @@ const handler = async () => { await page.close(); await browser.close(); - } catch (error) { throw new Error(error.message); } }; -handler(); +handler().then(() => console.log("Done")); diff --git a/examples/serverless-with-lambda-layer/index.js b/examples/serverless-with-lambda-layer/index.js index c246b67..039cdec 100644 --- a/examples/serverless-with-lambda-layer/index.js +++ b/examples/serverless-with-lambda-layer/index.js @@ -1,5 +1,5 @@ const puppeteer = require("puppeteer-core"); -const chromium = require('@sparticuz/chromium'); +const chromium = require("@sparticuz/chromium"); module.exports = { handler: async () => { @@ -22,9 +22,8 @@ module.exports = { await page.close(); await browser.close(); - } catch (error) { throw new Error(error.message); } - } + }, };