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);
|
||||
parameters.url = file.url;
|
||||
}
|
||||
if (typeof PDFJSDev !== 'undefined' &&
|
||||
PDFJSDev.test('FIREFOX || MOZCENTRAL || CHROME')) {
|
||||
if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION')) {
|
||||
parameters.docBaseUrl = document.URL.split('#')[0];
|
||||
} else if (typeof PDFJSDev !== 'undefined' &&
|
||||
PDFJSDev.test('FIREFOX || MOZCENTRAL || CHROME')) {
|
||||
parameters.docBaseUrl = this.baseUrl;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user