Skip to content

Commit

Permalink
Merge pull request #132 from nstuyvesant/patch-1
Browse files Browse the repository at this point in the history
fix(ELEMENT_NODE) - avoid error when Node is undefined
  • Loading branch information
IDisposable authored Apr 25, 2023
2 parents b478ee5 + b83c72d commit 2562a0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dom-to-image-more.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
const inliner = newInliner();
const fontFaces = newFontFaces();
const images = newImages();
const ELEMENT_NODE = Node.ELEMENT_NODE || 1;
const ELEMENT_NODE = typeof Node === 'undefined' ? 1 : Node.ELEMENT_NODE || 1;

// Default impl options
const defaultOptions = {
Expand Down

0 comments on commit 2562a0a

Please sign in to comment.