Skip to content

Commit f396dcb

Browse files
authored
WebGPURenderer: Fix broken worker support. (mrdoob#31607)
1 parent 875d092 commit f396dcb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/renderers/common/Textures.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ class Textures extends DataMap {
376376

377377
if ( image.image !== undefined ) image = image.image;
378378

379-
if ( image instanceof HTMLVideoElement ) {
379+
if ( ( typeof HTMLVideoElement !== 'undefined' ) && ( image instanceof HTMLVideoElement ) ) {
380380

381381
target.width = image.videoWidth || 1;
382382
target.height = image.videoHeight || 1;

src/textures/Source.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class Source {
8383

8484
const data = this.data;
8585

86-
if ( data instanceof HTMLVideoElement ) {
86+
if ( ( typeof HTMLVideoElement !== 'undefined' ) && ( data instanceof HTMLVideoElement ) ) {
8787

8888
target.set( data.videoWidth, data.videoHeight, 0 );
8989

0 commit comments

Comments
 (0)