We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfb4b84 commit 381296aCopy full SHA for 381296a
src/core/renderers/canvas/CanvasCoreTexture.ts
@@ -138,16 +138,12 @@ export class CanvasCoreTexture extends CoreContextTexture {
138
this.image = canvas;
139
return { width: data.width, height: data.height };
140
} else if (
141
- typeof ImageBitmap !== 'undefined' &&
142
- data instanceof ImageBitmap
+ (typeof ImageBitmap !== 'undefined' && data instanceof ImageBitmap) ||
+ data instanceof HTMLImageElement
143
) {
144
this.image = data;
145
146
}
147
- if (data instanceof HTMLImageElement) {
148
- this.image = data;
149
- return { width: data.width, height: data.height };
150
- }
151
return { width: 0, height: 0 };
152
153
0 commit comments