accessibility-luxembourg / simplA11yPDFCrawler

This tool crawls a list of websites and download all PDF and office documents. Then it analyses the PDF documents and tries to detect accessibility issues.
MIT License
22 stars 3 forks source link

TypeError: Cannot read property 'toLowerCase' of undefined #8

Open mgifford opened 1 year ago

mgifford commented 1 year ago

JS error when parsing one of the files.

./crawled_files/www.medicare.gov/summarynoticeenvelope.pdf
/home/mike/simplA11yPDFCrawler/docAnalysis.js:27
    if (line['Exempt'].toLowerCase() == 'true') {
                       ^

TypeError: Cannot read property 'toLowerCase' of undefined
    at /home/mike/simplA11yPDFCrawler/docAnalysis.js:27:24
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/home/mike/simplA11yPDFCrawler/docAnalysis.js:23:10)
    at Module._compile (internal/modules/cjs/loader.js:1138:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
    at Module.load (internal/modules/cjs/loader.js:986:32)
    at Function.Module._load (internal/modules/cjs/loader.js:879:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47