Skip to content

Commit 2562a0a

Browse files
authored
Merge pull request #132 from nstuyvesant/patch-1
fix(ELEMENT_NODE) - avoid error when Node is undefined
2 parents b478ee5 + b83c72d commit 2562a0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dom-to-image-more.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
const inliner = newInliner();
66
const fontFaces = newFontFaces();
77
const images = newImages();
8-
const ELEMENT_NODE = Node.ELEMENT_NODE || 1;
8+
const ELEMENT_NODE = typeof Node === 'undefined' ? 1 : Node.ELEMENT_NODE || 1;
99

1010
// Default impl options
1111
const defaultOptions = {

0 commit comments

Comments
 (0)