Fix new Raster(HTMLCanvasElement) (#1745)

Fix a typo in object.getContext (was object.getContent) accessor to properly identify a canvas
This commit is contained in:
Filprots 2019-12-18 13:44:45 +03:00 committed by Jürg Lehni
parent 2d1856322c
commit c73e08a481

View file

@ -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: