mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-26 22:14:01 +00:00
Check for createWindow presence. Closes #1790
This commit is contained in:
parent
1d7cfefba1
commit
70c6d5b030
1 changed files with 3 additions and 2 deletions
|
|
@ -14,7 +14,9 @@ else {
|
|||
fabric.document = require("jsdom")
|
||||
.jsdom("<!DOCTYPE html><html><head></head><body></body></html>");
|
||||
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue