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

@ -36,7 +36,7 @@ describe('custom canvas rendering', function() {
let page;
beforeAll(function(done) {
if (isNodeJS()) {
if (isNodeJS) {
CanvasFactory = new NodeCanvasFactory();
} else {
CanvasFactory = new DOMCanvasFactory();