Skip to content

Commit 8146d0a

Browse files
fix: check if OffscreenCanvas in window before accessing (#31194)
1 parent c0088a7 commit 8146d0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/renderers/webgl-fallback/utils/WebGLTextureUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ class WebGLTextureUtils {
506506
} else if ( ( typeof HTMLImageElement !== 'undefined' && source instanceof HTMLImageElement ) ||
507507
( typeof HTMLCanvasElement !== 'undefined' && source instanceof HTMLCanvasElement ) ||
508508
( typeof ImageBitmap !== 'undefined' && source instanceof ImageBitmap ) ||
509-
source instanceof OffscreenCanvas ) {
509+
( typeof OffscreenCanvas !== 'undefined' && source instanceof OffscreenCanvas ) ) {
510510

511511
return source;
512512

0 commit comments

Comments
 (0)