Skip to content

Commit

Permalink
Example of one promise for all
Browse files Browse the repository at this point in the history
  • Loading branch information
baruchiro committed Dec 24, 2020
1 parent 2146cce commit 4bcdb0d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/backend/import/downloadChromium.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@ import { getPuppeteerConfig } from 'israeli-bank-scrapers-core';

const revision = getPuppeteerConfig().chromiumRevision;

let pathPrms

export default async function downloadChromium(installPath, onProgress) {
return download({
console.log({ pathPrms })
if (pathPrms) return pathPrms;

pathPrms = download({
revision,
installPath,
onProgress,
});
})

return pathPrms
}

0 comments on commit 4bcdb0d

Please sign in to comment.