From c73e08a481e10243aff26fdfcb7d5669be1d9d99 Mon Sep 17 00:00:00 2001 From: Filprots Date: Wed, 18 Dec 2019 13:44:45 +0300 Subject: [PATCH] Fix new Raster(HTMLCanvasElement) (#1745) Fix a typo in object.getContext (was object.getContent) accessor to properly identify a canvas --- src/item/Raster.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/item/Raster.js b/src/item/Raster.js index fee172f5..ed4742f0 100644 --- a/src/item/Raster.js +++ b/src/item/Raster.js @@ -124,7 +124,7 @@ var Raster = Item.extend(/** @lends Raster# */{ ? source : null; if (object && object !== Item.NO_INSERT) { - if (object.getContent || object.naturalHeight != null) { + if (object.getContext || object.naturalHeight != null) { image = object; } else if (object) { // See if the arguments describe the raster size: