Merge pull request #3416 from peerlibrary/noHTMLElement
instanceof HTMLElement does not work in jsdom node.js module.
This commit is contained in:
commit
6d1533293e
@ -1709,7 +1709,8 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
||||
var heightScale = Math.max(Math.sqrt(c * c + d * d), 1);
|
||||
|
||||
var imgToPaint;
|
||||
if (imgData instanceof HTMLElement) {
|
||||
// instanceof HTMLElement does not work in jsdom node.js module
|
||||
if (imgData instanceof HTMLElement || !imgData.data) {
|
||||
imgToPaint = imgData;
|
||||
} else {
|
||||
var tmpCanvas = CachedCanvases.getCanvas('inlineImage', width, height);
|
||||
|
Loading…
Reference in New Issue
Block a user