Skip to content

Commit c19aa19

Browse files
authored
WebGPU: Fix navigator usage. (mrdoob#29965)
1 parent 4749f99 commit c19aa19

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/jsm/capabilities/WebGPU.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
let isAvailable = navigator.gpu !== undefined;
2-
1+
let isAvailable = ( typeof navigator !== 'undefined' && navigator.gpu !== undefined );
32

43
if ( typeof window !== 'undefined' && isAvailable ) {
54

0 commit comments

Comments
 (0)