diff --git a/qrcode.js b/qrcode.js index 5507c15..302a664 100644 --- a/qrcode.js +++ b/qrcode.js @@ -219,7 +219,7 @@ var QRCode; return Drawing; })(); - var useSVG = document.documentElement.tagName.toLowerCase() === "svg"; + var useSVG = global.document && document.documentElement.tagName.toLowerCase() === "svg"; // Drawing in DOM by using Table tag var Drawing = useSVG ? svgDrawer : !_isSupportCanvas() ? (function () {