1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Check that this.baseUrl is defined before attempting to fetch any data in DOMCMapReaderFactory/NodeCMapReaderFactory

This commit is contained in:
Jonas Jenwald 2017-09-28 12:29:01 +02:00
parent 25806d17f4
commit a159c4f357
3 changed files with 46 additions and 2 deletions

View file

@ -68,6 +68,10 @@ class DOMCMapReaderFactory {
}
fetch({ name, }) {
if (!this.baseUrl) {
return Promise.reject(new Error('CMap baseUrl must be specified, ' +
'see "PDFJS.cMapUrl" (and also "PDFJS.cMapPacked").'));
}
if (!name) {
return Promise.reject(new Error('CMap name must be specified.'));
}