1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08: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:
Jonas Jenwald 2019-11-10 16:42:46 +01:00
parent 2817121bc1
commit 74e00ed93c
16 changed files with 49 additions and 50 deletions

View file

@ -48,7 +48,7 @@ describe('display_utils', function() {
it('`create` should return a canvas if the dimensions are valid',
function() {
if (isNodeJS()) {
if (isNodeJS) {
pending('Document is not supported in Node.js.');
}
@ -84,7 +84,7 @@ describe('display_utils', function() {
it('`reset` should alter the canvas/context if the dimensions are valid',
function() {
if (isNodeJS()) {
if (isNodeJS) {
pending('Document is not supported in Node.js.');
}
@ -105,7 +105,7 @@ describe('display_utils', function() {
});
it('`destroy` should clear the canvas/context', function() {
if (isNodeJS()) {
if (isNodeJS) {
pending('Document is not supported in Node.js.');
}
@ -145,7 +145,7 @@ describe('display_utils', function() {
it('`create` should return an SVG element if the dimensions are valid',
function() {
if (isNodeJS()) {
if (isNodeJS) {
pending('Document is not supported in Node.js.');
}
@ -167,7 +167,7 @@ describe('display_utils', function() {
it('`createElement` should return an SVG element if the type is valid',
function() {
if (isNodeJS()) {
if (isNodeJS) {
pending('Document is not supported in Node.js.');
}