Browse Source

WebGPURenderer: Guard reference to `VideoFrame`. (#31864)

Michael Herzog 8 months ago
parent
commit
1aeae994a2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/renderers/common/Textures.js

+ 1 - 1
src/renderers/common/Textures.js

@@ -391,7 +391,7 @@ class Textures extends DataMap {
 				target.height = image.videoHeight || 1;
 				target.depth = 1;
 
-			} else if ( image instanceof VideoFrame ) {
+			} else if ( ( typeof VideoFrame !== 'undefined' ) && ( image instanceof VideoFrame ) ) {
 
 				target.width = image.displayWidth || 1;
 				target.height = image.displayHeight || 1;

粤ICP备19079148号