mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Change isNodeJS
from a function to a constant
Given that this shouldn't change after the `pdf.js`/`pdf.worker.js` files have been loaded, it doesn't seems necessary to keep this as a function.
This commit is contained in:
parent
2817121bc1
commit
74e00ed93c
16 changed files with 49 additions and 50 deletions
|
@ -51,7 +51,7 @@ const TEST_PDFS_PATH = {
|
|||
|
||||
function buildGetDocumentParams(filename, options) {
|
||||
let params = Object.create(null);
|
||||
if (isNodeJS()) {
|
||||
if (isNodeJS) {
|
||||
params.url = TEST_PDFS_PATH.node + filename;
|
||||
} else {
|
||||
params.url = new URL(TEST_PDFS_PATH.dom + filename, window.location).href;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue