Skip to content

Commit

Permalink
Changed to use functio nsyntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBone committed Sep 11, 2018
1 parent f34230c commit de14f0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scraper.js
Expand Up @@ -102,10 +102,10 @@ function parsePdfs(database, url) {

let pdfParser = new pdf2json();
request({ url: pdfUrl, encoding: null }).pipe(pdfParser);
pdfParser.on("pdfParser_dataError", error => { console.error(error); });
pdfParser.on("pdfParser_dataError", function(error) { console.error(error); });
pdfParser.on("error", function() { });
pdfParser.on("finish", function() { });
pdfParser.on("pdfParser_dataReady", pdf => {
pdfParser.on("pdfParser_dataReady", function(pdf) {
// Convert the JSON representation of the PDF into a collection of PDF rows.

console.log(`Parsing PDF: ${pdfUrl}`);
Expand Down

0 comments on commit de14f0d

Please sign in to comment.