Assign a dummy value to the docBaseUrl
API parameter in non-PRODUCTION
mode
This ensures that relative links are displayed when using the viewer in `gulp server` mode, in an effort to aid development/debugging.
This commit is contained in:
parent
7115e136e4
commit
39a77c76ad
@ -658,8 +658,10 @@ let PDFViewerApplication = {
|
|||||||
this.setTitleUsingUrl(file.originalUrl);
|
this.setTitleUsingUrl(file.originalUrl);
|
||||||
parameters.url = file.url;
|
parameters.url = file.url;
|
||||||
}
|
}
|
||||||
if (typeof PDFJSDev !== 'undefined' &&
|
if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION')) {
|
||||||
PDFJSDev.test('FIREFOX || MOZCENTRAL || CHROME')) {
|
parameters.docBaseUrl = document.URL.split('#')[0];
|
||||||
|
} else if (typeof PDFJSDev !== 'undefined' &&
|
||||||
|
PDFJSDev.test('FIREFOX || MOZCENTRAL || CHROME')) {
|
||||||
parameters.docBaseUrl = this.baseUrl;
|
parameters.docBaseUrl = this.baseUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user