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:
parent
25806d17f4
commit
a159c4f357
3 changed files with 46 additions and 2 deletions
|
@ -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.'));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue