diff --git a/HEADER.js b/HEADER.js index 6204b0d7..deca0d31 100644 --- a/HEADER.js +++ b/HEADER.js @@ -14,7 +14,9 @@ else { fabric.document = require("jsdom") .jsdom(""); - fabric.window = fabric.document.createWindow(); + if (fabric.document.createWindow) { + fabric.window = fabric.document.createWindow(); + } } /** @@ -30,7 +32,6 @@ fabric.isTouchSupported = "ontouchstart" in fabric.document.documentElement; fabric.isLikelyNode = typeof Buffer !== 'undefined' && typeof window === 'undefined'; - /** * Attributes parsed from all SVG elements * @type array